Math 155 - Winter 2001
Programming Assignment #4
Programming Assignment #4: For this assignment you add material properties and lighting to your torus.
Due date: Monday, February 26. Extended to Tuesday, February 27.
Your basic task is to modify the torus and pyramid from the previous assignment with colors and material properties (surface properties), and to include lights in the scene. This will enable your torus to look three-dimensional in GL_FILL mode and to show the effects of ambient and diffuse lighting and specular reflections.
Your program must:
A sample program will be available as LightTorus.exe in the public directory. This program uses the following new keystroke commands:
Your program should include these features of the sample program. In addition, like the sample program, they should show the light positions by drawing emissive spheres of the same colors as the lights. Your program should select colors and shininess values so as to make an interesting view, and show specular highlights. You do not need to use the same colors and light positions as the sample program. You should experiment with a local viewer and lights and with a non-local view angle and directional lights, and be able to explain the differences in the specular highlights. You should be able to explain the ambient and diffuse material values and light values and they interact to create the colors. You should be able to toggle between smooth and flat shading and be able to explain the visual effects of Phong interpolation. You should pay attention to how many wraps and segments per wrap are needed before Phong interpolation looks good (and this will probably be different for local and non-local viewer and lights.)
For full credit, you should add another lighting feature to your code and be able to discuss how it works. Suggestions for this include any (one of) the following: