CMSC 435/634: Introduction to Computer Graphics

Assignment 5
Due November 23, 2004

Last update:
Fri Nov 19 13:05:27 EST 2004

The Assignment

For this assignment, you will extend your ray tracer from assignment 4 to shade surfaces according to their material properties and the positions of the lights and camera. For the basic assignment, you will add the effects of shadows, diffuse and Phong specular illumination to polygons. You will need to use the 'l' light position and color lines from the NFF file, as well as the remaining parameters from the 'f' surface 'fill' material lines. For the basic assignment, you need only use the polygon normal, not per-vertex normals.

For each intersection, you will shoot shadow rays toward each light to determine if the light is visible from the intersection point. Visible lights contribute

light_color * surface_color * (kd diffuse + ks specular)

Extra credit

Implement one or more of: reflected rays (5 pts), refracted rays (5 pts), shading of spheres (5 pts), or shading of cones (10 pts).

634 only

Research and select a method to interpolate vertex normals inside 'pp' polygon primitives.

What to turn in

Turn in this assignment electronically by checking your source code into your Assn5 CVS directory by 11:59 PM on the day of the deadline. We will use a dated checkout for grading, so you will be graded on whatever has been checked in as of 11:59 PM. Be sure to include a Makefile that will build your project when we run 'make', and a readme.txt file telling us about your assignment. What (if any) help did you receive from books, web sites or people other than the instructor and TA? What extra credit features did you add?

Also submit everything we need to run your submission. Double check the output of cvs update after you submit to make sure you have not forgotten any important source files. Submit your Makefile, any headers and C/C++ files, and any other auxiliary files we might need. Be sure to comment your code! You will not be graded on the presence or quality of your comments, but we will look at your code and anything that helps us understand what you did (or were trying to do) can only help. In any case, your programs are expected to be robust and easy to understand.