Back to CG425

Assignment 4: Ray Tracing

I implemented a JavaScript ray tracer that reads scene descriptions from JSON and renders spheres/planes with Blinn-Phong illumination. The renderer supports ambient, diffuse, specular, shadows, and recursive reflections with configurable max depth.

Implemented Results

  • Ray-scene intersection for spheres and planes
  • Ambient shading baseline
  • Diffuse + shadows
  • Specular highlights using halfway vectors
  • Recursive reflections with depth control

Output Samples

Ray tracing complete render Ambient component render Diffuse component render Specular component render Reflection render at depth 1 Reflection render at depth 5

Live Demo

The ray tracer demo below lets you choose a scene from the dropdown (including None).

© 2026 Riccardo Bonfanti
Built with Astro