Reflection
The Images
No extras image (one reflective sphere, one reflected ray) (88 secs):

8 reflected rays, 0.01 jitter (~150 secs):

8x supersampling, 8 reflected rays, 0.01 jitter (~11000 secs):

8x supersampling, 8 reflected rays, 0.005 jitter (~11000 secs):

2x supersampling, 2 reflected rays, 0.0 to 0.5 jitter
60 frames (~220 secs/frame = ~13200 secs)
It’s a MOVIE, click it:
Discussion
My code was such that it was a matter of copy/paste to create the illuminate method from the slides. Jitter was created by adding a random (configurable) amount to the x,y, and z parameters of the direction of each ray. This jitter only has an effect when using supersampling or when firing multiple reflected rays.
The Code
- raytracer.py
- The ray tracing application that iterates through the pixels. Also contains classes to model the scene and output.
- primitives.py
- The primitives (shapes, lights, ray, colors).
- shaders.py
- The shaders
- movie.py
- A script to create movies from ray traced images
- input.ray
- A sample input file
