Ray Tracer Checkpoint 6: Transmission

Assigned: January 20, 2010 (Early Release)

Due: February 3, 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 #6, "Transmission".

Objective

Using your program from Checkpoint #5 (without extras), the task for this assignment is to transmission/refraction rays to your ray tracer.

At the intersection point, in addition to the reflection ray and the shadow ray, you must follow the transmission ray (through the intersected object) to determine its color contribution to the intersection point.

You will need to add the following to your ray tracer to support this:

Use an index of refraction of 1.0 for the air around your objects.

Remember that you must keep track of whether your ray is inside or outside of the intersected object. The transmission ray moves into the object from the original intersection point, refracted according to Snell's Law; when it again intersects the surface of the object on its way out, it is refracted a second time.

Each transition (outside to inside, inside to outside) requires the calculation of a normal vector; however, remember that these normals are pointing in opposite directions.

Here are suggested parameters for your spheres:

Parameter Glass Sphere Mirror Sphere
Ambient color white (0.7, 0.7, 0.7)
Diffuse color white (0.7, 0.7, 0.7)
Specular color white white
ka 0.075 0.15
kd 0.075 0.25
ks 0.2 1.0
ke 20.0 20.0
kr 0.01 0.75
kt 0.85 0.0
η 0.95 irrelevant

You will find the illumination algorithm in the Checkpoint 6 lecture notes, along with the formulae for calculating the transmission ray.

What to Submit

To submit your solution, do the following before midnight on February 3, 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 one possible "extra":

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