Topics:
Projections: Orthographic, Perspective
Moving the camera
Drawing GLU and GLUT objects
Hidden surface removal: culling, z-buffering
You will be making a new program that will use many of the topics from the last two weeks. You will be comparing the two projections available in OpenGL: Orthographic and Perspective. Start by making a large window (800x400) with two smaller square subwindows (400x400). In each subwindow, the same exact scene will be rendered, one for each projection. The camera will rotate around the object to view the different sides of the object. Define a key that starts and stops the motion. The object and how it is drawn (wireframe or flat-shaded polygons) should be specified by choices presented in a menu. Enable backface culling and Z-buffering.
Requirements:
Two windows rendering the same scene (2 points)
Camera motion controlled via the timer callback, and via keyboard input (2 points)
Selectable objects and drawing styles: (5 points)
cube with 6 different color sides
quadric cylinder
quadric disk
quadric sphere
cone
icosahedron
Utah teapot
Wireframe
Flat-shaded
Dimensions:
Cube:
length 1 on each side and centered around the origin
Disk:
.25, .5, 10, 4
Cylinder:
.5, 1.0, 2.0, 10, 10
Sphere:
1.0, 10, 10
Projections:
Orthographic: -3.5, 3.5, -3.5, 3.5, -10.0, 10.0
Frustum: -1.0, 1.0, -1.0, 1.0, 1.5, 20.0
Camera distance from Y-axis: 5
Camera height from X-Z plane: 5
Last modified January 25, 2010.