CompSci 124
Fall 2009
Computer Graphics

Basic Ray Tracer

Write a ray tracer that displays basic shapes, lights, and materials. Ray tracing is, in some sense, the most natural way to generate images. By generating and casting rays, the ray tracer is able determine what color we would see if we looked in some direction from some point of view. Within the accuracy of the scene and shading models and with enough computing time, the images produced by a ray tracer can be physically accurate and can appear indistinguishable from real images. The ray tracer you are required to write for this assignment will not be able to produce physically accurate images since it is very basic, containing just the key elements regarded to be a ray tracer.

Minimally, your ray tracer must have support for:

All data regarding the scene to be traced should be read from a data file. You do not need to worry about malformed input, either syntactically or semantically. For instance, you will not be given a sphere with a negative radius or a scene without a camera. Additionally, you do not have to worry about the camera being inside an object.

You will be given a coding framework to spare you from the mundane details of GUIs, I/O, vector arithmetic, etc. However, you will need to complete all of the methods of the ray tracer yourself. Feel free to create whatever new classes you think are necessary, change parameter lists, etc. In the end, if your program works, and is understandable, you will receive full credit. Be aware, though, that while there is no one “right” way to do this assignment, there are many incorrect ways to do it.

Extra Credit

There are many possible additions to the basic ray tracer. You can earn bonus points with extremely creative or artistic solutions. Make sure that you mention your assumptions, extra features, and how to run your program (especially with regard to command line arguments) in your README file.

To get you started, here are some extra credit ideas:

Resources