Project 5

Where it all traces back to

Description
The applets below show the functionality
of my Raytracer class augmented with
transparency. For a new object, I chose
to implement a cube primitive, because
of its versatility. Contrary to my
initial belief, it was not an easy under-
taking!
Extra features I implemented:
  • Cube primitive (see above). Specify
    a cube in an input file with the following
    syntax:

      cube minx miny minz maxx maxy maxz

    where the points min and max are the minimum
    and maximum corners of the cube.
  • Bounding spheres--takes advantage of the already-implemented Sphere class, adding
    a flag to determine whether or not it is
    a bounding sphere. If it is, the tracer
    won't attempt to perform shading calculations
NOTE: The bounding spheres actually slowed
down the tracer, probably because my scenes use
mainly large cubes which are usually visible.
Click here for the source code.

Scene 1


Scene 2