Handed out: Feb 25, 2009
Due: midnight, March 5, 2009
1. You will write a program that uses perspective projection in OpenGL.
2. Your scene should be 3D blocks which rotate like the last assignment.
3. Make each block have different color vertices (your choice). The configuration should be similar to the last assignment (multiple blocks, rotating and translating). However, this time I want one cube on the bottom twice as big as the cube which will sit on top of that cube. The bottom cube should spin in the same rotation direction as the group spins. The top cube should spin in an opposite direction from the bottom cube. The pairs of cubes (top/bottom) should be arranged in a 'pinwheel' like configuration (like the last assignment). The cubes should be on a plane (flat surface) with a large extent. The plane should be gray.
4. You should enable depth-buffering but no lighting.
5. The camera should look at the center of the scene (blocks rotating on the plane).
6. The camera should rotate around the look-at point and have the gaze-direction be about 45 degrees from the look-at point. It needs to rotate in the circle.
7. The + and – keys control the block rotation while the ‘f’ and ‘s’ keys should make the camera rotate faster ‘f’ or slower ‘s’.
8. Use a 90 degree frustum.
This assignment is to make sure you know how to place and modify the camera as well as use OpenGL perspective projection.
Extra credit of implementing a ‘virtual track ball’ which moves the camera in the 3D scene (it’s in the book).
The program should draw its output to an OpenGL window of size 512x512 as in the example program.
use the handin routine in the CADE Lab. You can with zip or tar your solution. You should comment your code appropriately and hand in a web-page that will serve as complete documentation. Please include a paragraph of difficulties and a paragraph of what you learned in this assignment.
The handin name for this lab is "lab5".
Windows users should use the Zip utility and handin a single zipped file. Unix users should use the tar program to do the same. We will recompile the programs to grade them. Make sure your workspace/program will compile for us. That is, be careful about your user-specific pathname variables! If you do this on a home machine, please allow sufficient time for porting to the CADE machines. We will grade based on compiling and running on the CADE machines.
Due to a bug in the handin program, do not include spaces in the names of the files that you submit, otherwise we will not receive them. For instance, "no spaces.txt" is not a valid filename and would not be received, while "no_spaces.txt" is valid. Please keep this in mind while handing in your assignment.