N/A
Ambient occlusion illumination based on the background texture. The sky to the right is lit reddish-yellow while the sky to the left is a bluish-green. Note that all materials have an ambient coefficient of zero and that there are no other light sources.
Thin-lens-approximation camera with depth-of-field centered on the dielectric sphere.
Single-bounce indirect illumination. The light source is on the near side of the partition near the middle of the image. The cone in the upper right behind the partition receives illumination only from the surfaces around it. Note the two Phong highlights on it corresponding to the light leaking around the two sides of the partition. The ground plane and tops of other surfaces are recieving illumination reflected off a medium size box above the camera and centered on the cone.
And of course I've had glossy reflections since Program 2. Here's the creative image from Program 4 again:
The ambient occlusion illumination was added as a new light source. This acts a bit like the infinite-distance directional except that each time it is called it picks a random direction vector and uses the background shader to determine the basic colour. This approach has some advantages and disadvantages. It is quite simple to implement, works with any existing material without rewrite (e.g. the dielectric) and localized bright regions in the background will show up in Phong highlights. (You can see the faint blue cast on the top-left of the dielectric in the first image.) The downside is that with this fairly naive approach, the light doesn't really have sufficient knowledge to be able to use any variance reduction techniques such as jittered sampling. Thus it take a lot of samples to make the picture come out looking reasonable.
The thin-lens camera model was implemented directly from the class notes as a new subclass of camera.
The single bounce indirect illumination was added another light subclass. When asked for the direction and colour, the lightsource shoots a ray in a random direction. If it strikes something, the normal at that bounce point is used to attenuate the light colour/intensity and the direction from the original intersection point to the bounce point is returned for the light direction.