Computer Science 155: Graphics 
Fall 2000 
Homework 4


This assignment is due by noon on Friday, Oct. 13.  Please put your name, name of program, and compiling instructions at the top of your files. In addition, describe the features you've implemented and comment each function (explaining briefly what it does and what its arguments are).  You should provide sufficient additional comments for the graders to understand the logic of the program. 

  The objective in this assignment is to read the description of a 3D object from a file, transform it according to the user's input, and then render it to the screen. The major additions over assignment 3 are perspective projection and z-buffering. For assignment 4, the menu options available to the user should include:

The input file "polygon.dat" contains a description of each polygon in the object and how it is positioned within the object. The file format is described below. Here are sample data files for a cube and a pyramid . Note that we are now allowing colors 0 through 7. A new display() routine handles all 7 colors and should replace your current version.   To render the object you should do the following: