The goal of this assignment is to display your object of revolution using Phong shading instead of line segments. To do this, you will need to set two or more material properties of your object model and define two or more light sources using OpenGL functions. This project has the following steps:
Bonus (10 points): If you are feeling inspired, you might like to create a scene with a table or bookcase with multiple objects of rotation standing on top. To do this, you can adapt object definitions from "office.c" and perform translations, rotations, scalings to place your objects of rotation in the correct positions.
As noted above, the main design task will be to select material colors and properties, and light source positions. In both cases, a little trial and error should give you something you are happy with. The other design task is to figure out what order to display the polygons in your object to minimize the number of times you have to change material properties.
The sample program "surface2.c" shows the OpenGL commands necessary to use Phong shading for a smooth surface of the form (x,y,z(x,y)) where z(x,y) is a second order polynomial. You will need to replace this code with your object or revolution code. The "surface2.c" program also lets users change material properties interactively. You do not need to support this, but you do need to have multiple material properties in your object definition.
Test your program to check that it operates correctly for all of the requirements listed above. Also check for the error handling capabilities of the code. Save your testing output in text files for submission on the program due date.
When you have completed your C++ program, write a short report (less than one page long) describing what the objectives were, what you did, and the status of the program. Does it work properly for all test cases? Are there any known problems? Save this report in a separate text file to be submitted electronically.
In this class, we will be using electronic project submission to make sure that all students hand their programming projects and labs on time, and to perform automatic analysis of all programs that are submitted. When you have completed the tasks above go to the class web site to "submit" your documentation, C++ program, and testing files.
The dates on your electronic submission will be used to verify that you met the due date above. All late projects will receive reduced credit (50% off if less than 24 hours late, no credit if more than 24 hours late), so hand in your best effort on the due date.
You should also PRINT a copy of these files and hand them into your teaching assistant in your next lab. Include a title page which has your name and uaid, and attach your hand written design notes from above.