A Java ray tracer supporting recursive Phong shading, BVH acceleration, soft shadows, depth of field, and glossy reflection/refraction, with scenes defined declaratively in XML or JSON.
Authors: Matt Kuperwasser and Moshe Hanau.
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
- Recursive Phong shading (emission, ambient, diffuse, specular, shadows, reflection, refraction)
- Geometric primitives: sphere, plane, triangle, polygon, cylinder, tube
- BVH acceleration with SAH-based splitting
- Anti-aliasing / soft shadows / depth of field via adaptive beam sampling
- Scene definition via XML or JSON
- Multi-threaded rendering
- A simple Swing GUI for launching and viewing renders
The project builds with Maven (pom.xml).
mvn test— compile and run the fast unit/component/integration testsmvn test -Dgroups=render -DexcludedGroups=— run only the slow render/image-generation tests (writes toimages/)mvn test -DexcludedGroups=— run everything, including rendersmvn compile— compile onlymvn exec:java— launch the GUI (gui.RenderApp)
primitives—Point,Vector,Ray,Color,Double3,Material,Utilgeometries—Intersectable,Geometry, and implementations (Sphere,Plane,Triangle,Polygon,Cylinder,Tube,Geometries)lighting—LightSource,AmbientLight,DirectionalLight,PointLight,SpotLightscene—Scene,SceneLoader,XmlSceneLoader,JsonSceneLoaderrenderer—Camera,ImageWriter,RayTracerBase,SimpleRayTracer,BeamSampler,PixelManagergui—RenderApp/RenderWindow, a Swing front end for launching and viewing scenes
Scene definitions live under sceneSourceFiles/{xml,json}/; rendered output is written to
images/.
org.json:json— JSON scene parsingorg.junit.jupiter:junit-jupiter— tests





