Box & Reflective Tetrahedron
Using a BSP tree for reflections and object intersection
Raytrace.class 160x160
This was built for efficiency with a single-class binary space tree implementation. The tree is stored in flattened, fixed size arrays for optimal performance - no expensive memory allocation and object creation or deletion.
The render buffer is a byte array which is displayed using a MemoryImageSource and an IndexColorModel (this is 256 colours).
Raytrace.class.Source (3 files)
- L3DApplet.java java · 61 lines
- raytrace.html html · 17 lines
- Raytrace.java java · 1625 lines