Raytracer

March 2008

Hovering spheres

Golden spiral

Grid with refractive orb

Requirements

In CPSC 314: Computer Graphics, the third project of the course was to build a 3D rendering engine using a ray tracing algorithm. This algorithm produces very accurate and high resolution results, and is sometimes used in 3D animation systems.

The assignment required the renderer to support planes, spheres, diffuse, specular, and ambient lighting, shadows, and reflection.

My Implementation

I implemented all of the requirements in the assignment, as well as adding support for refraction (with translucent planes and spheres) and creating two additional scenes.

Additionally, I developed an algorithm for generating a golden spiral of arbitrary size, and wrote an implementation in Ruby that generated a spiral of reflective spheres in the input format for my ray tracer.

Key Technologies

  • 3D rendering
  • C++
  • Math (geometry)
  • Physics (light)
  • Ruby

Source

Download Raytracer source code