The goal of this assignment is to become more familiar with lighting models in OpenGL and user interaction via callback functions. Your task is to extend the "rotate.c" program (or rotate2.c) to add Phong shading to the model, and to allow users to interactively change the lighting model parameters. This project has four tasks:
There are several design issues for this assignment. First, how are you going to initialize/store the (x,y,z) coordinates of the surface? How are you going to calculate/store and the corresponding surface normals (Nx, Ny, Nz)? How are you going to store/change the Phong lighting parameters?
You may want to implement your solution in four phases, matching the tasks listed above. Remember to "grow your solution" incrementally. As a general principal, you will receive more credit for a working program that completes 1/2 the tasks than you will for a non-working program that attempts all of the tasks.
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 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 hand in your documentation, program, and testing files. You are welcome to use either the "submit" or the "file upload" method.
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 instructor in the department office. Include a title page which has your name and uaid, and attach your hand written design notes from above.