Camera

The Images

No extras image:

Supersampled image (4x supersampling):

Discussion

Supersampling was accomplished by creating an image that was n times larger than the requested image and then resizing it after all rays have been fired. This has the desired effect of firing n rays through one pixel and averaging the values. Some of the hooks are in place to let the ray tracer be configured from an input file, but this hasn’t been completely implemented yet.

The vector classes from cgkit have been used throughout the code.

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