Note: you must work on this assignment on your own.
See assignments overview page for general information.
The ray tracer programming assignment is divided into seven checkpoints:
This is checkpoint #6, "Transmission".
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.
To submit your solution, do the following before midnight on May 2, 2012:
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.
Recall that you must do five "extras" and add support for triangular meshes in order to achieve the full 100 points for the programming assignments. "Extras" are worth two points each. This assignment has one possible "extra":
If you choose to do this extra, put multiple images on your web site: