About Ray Tracer
This assignment implements a basic ray tracing rendering algorithm from a 3D scene of spheres and triangle objects, lighting sources (ambient, point, and directional), and the camera.
Basic Features
The program:
- Renders screen objects, which consist of a geometric primitive Shape (current subclasses are spheres and triangles but additional Shape subclasses can be easily added); Material for lighting and reflection calculations; and an optional Transformation.
- Computes lighting contributions for each pixel from ambient, point, and directional light sources (subclasses of Light base class) using Blinn-Phong shading.
- Applies rotation, scaling, and translation transforms to Lights and Shapes.
- Captures shadows cast by other screen objects that occlude light sources.
- Calculates mirror reflections through recursive ray tracing.
Movable Camera
I added a number of controls for changing the location and orientation of the camera, similar to the controls for moving around in 1st-person video games. The program allows the user to explore the scene using fairly intuitive mouse and keyboard controls to:
- Increase/decrease camera elevation angle.
- Rotate camera azimuth angle left or right.
- Move camera position up, down, left, right, forward, and backward.