Ray Tracer Checkpoint 5: Reflection

Assigned: April 15, 2009

Due: April 22, 2009

See assignments overview page for general information.


Introduction

The ray tracer programming assignment is divided into seven checkpoints:

  1. Setting the scene
  2. Camera modeling
  3. Basic shading
  4. Procedural shading
  5. Recursive ray tracing - reflection
  6. Recursive ray tracing - transmission
  7. Tone reproduction

This is checkpoint #5 - "Reflection"

Objective

Using your program from Checkpoint #4 (without extras), the task for this assignment is to add recursion to your ray tracer in the form of reflection rays.

At the intersection point, you'll need to obtain the reflection ray in addition to the shadow ray, and to follow the reflection ray to determine its color contribution to the intersection point. Note that the reflected ray is the reflection of the incoming ray (from the camera, or another reflected ray spawned from an earlier object intersection for the second/third/etc. levels of recursion).

You will need to add several things to your ray tracer to support this:

Use these rules:

You will find the illumination algorithm in the Checkpoint 5 lecture notes, along with the formula for calculating the reflection ray.

What to Submit

To submit your solution, do the following before midnight on April 22, 2009:

As it is extremely important to continue to make progress as the course progresses, late deliverables will be penalized 10% for each day late. There is an exception to this rule: if you anticipate any problems with meeting deliverable deadlines, see me well in advance (ideally, at least one week) of the deadline that might be missed, and we can attempt to work out alternate arrangements.

Extras

Recall that you must do at least four "extras" in order to achieve the full 100 points for the programming assignments. "Extras" are worth five points each; this assignment has one possible "extra":

If you choose to do this extra, put multiple images on your web site: