cos426.jpg (39279 bytes)

Computer Graphics, Fall 99

Thomas Funkhouser


Assignment 3: Ray Tracing

Due: 11/8/99 at 8:00AM.


In this assignment you will implement a basic raytracer.  To allow you to focus on the nuts and bolts of the actual ray tracing, you are provided with a host of data structures for managing the ray traced objects, linear algebra functions (vector and matrix objects and operations), a function for loading scene graph files into a prescribed node tree stucture, a BMP image file importer/exporter (for images and textures, etc), and a couple of supporting data structures for lights, materials, etc.


Samples of last years projects are available here. Some of the links are broken, but at least half of them contain some nice images.

What You Have to Do

It would be a good idea to use the recursive approach outlined in the handout, as your starting code is already organized in a similar fashion. You will notice that it is in essence an object oriented solution using C.  If you wish, you could port this naturally to C++, but this is not required. This link leads to a detailed description of the file format. The node tree and supporting structures into which it is parsed are described in the source files and will be discussed in precept.

The assignment is worth 15 points. The following is a list of features that you may implement. The number in parentheses corresponds to how many points it is worth.  Options in bold are mandatory.

By implementing all the required features, you get 10 points. There are many ways to get more points: It is possible to get more than 15 points. However, after 15 points, each point is divided by 2, and after 17 points, each point is divided by 4.

Getting Started

You should use the code available at /u/cs426/3/, on the MECA machines, as a starting point for your assignment. We provide you with: After you copy the provided files to your directory, the first thing to do is compile the program. If you are developing on a Windows NT machine, running Microsoft Visual C++, from the MS-DOS prompt, type:
% copy Makefile.nt Makefile 

% "c:\Program Files\Microsoft Visual Studio\VC98\Bin\vcvars32"

% nmake
If you are developing on a UNIX machine, type:
% cp Makefile.unix Makefile 

% make
An executable called ray or ray.exe will be compiled and linked.

What to Submit

You should submit: The writeup should be a HTML document called assignment3.html which may include other documents or pictures. It should be brief, describing what you have implemented, what works and what doesn't, how you created the art contest images, and any relavent instructions on how to run your interface.

Make sure the source code compiles in the MECA workstations. If it doesn't, you will have to attend to a grading session with a TA, and your grade will suffer.

Always remember the late policy and the collaboration policy.


Stay tuned for more hints.


Stay tuned for more questions.

Last update: 10/27/99 09:53 PM