Ray Tracer Checkpoint 3: Basic Shading

Assigned: December 16, 2009

Due: January 6, 2010

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 #3: "Basic shading".

Objective

Using your program from checkpoint #2 (without extras), the task for this assignment is to add Phong Illumination to your ray tracer. On intersection, rather than return the color of the object you hit, you must calculate the color at the intersection point using the Phong Illumination model. All the relevant Phong equations can be found in the CG2 lecture notes for Checkpoint 3 (on myCourses).

Recall that the Phong model:

You will need to add the following things to your program:

You'll need to work with the following vectors:

To apply the Phong model, if there is an intersection,

What to Submit

To submit your solution, do the following before midnight on January 6, 2010:

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 two possible "extras":

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

Notes

As before, modular design will greatly simplify future modifications to your code.