
Assignment 2
CMSC 740, Fall 2008
Due: 9:30am Thursday, October 9, 2008
This assignment involves familiarization with OpenGL texturing, viewport,
and simple animation. For this assignment, you should make the following
extensions to your program from the Assignment 1 with the aid of the start
up code and data at http://www.cs.umd.edu/class/fall2008/cmsc740/assg2/.
The start up code can be compiled on both Windows and Linux and it:
• opens an empty window of size 800
×
600.
• provides BMPImage class to load bitmap images.
• has a modified Smesh class to support animation.
• provides cloud.bmp, ground.bmp, and a new chicken.dat with 50
frames.
Your goal in this assignment is to map cloud and ground textures, animate/move chickens, and add a new
viewport/camera as shown in the figure.
(a) Texture mapping of cloud and ground and cloud movement.
- Texture map clouds on the four bounding planes – top, left, right, and far. Move the clouds as in the demo
program. (2 Points)
- Texture map the ground plane. (1 Point)
(b) Render, animate, and move five chickens along the track:
- Load the chickens using the Smesh class and complete the Smesh::draw function to render and animate
the chickens. (1 Point)
- Place five chickens in the five lanes and move each chicken with a randomly generated speed. (2 Points)
- Adjust the animation speed of each chicken (the rate at which the 50 frames are cycled) to correspond to
the spatial displacement rate of that chicken. (1 Point)
(c) Add an additional viewport and camera to track the leading chicken in the new viewport:
- The right-top viewport has a dimension of 266
×
200. (1 Point)
- The additional camera tracks the leading chicken as in the figure. (2 Points)
Special notes:
- Class forum is at (https://forum.cs.umd.edu/forumdisplay.php?f=118).
- Refer to the demo version to resolve any ambiguities that might have remained in the above description.
- Minor differences between the demo program and your program will not affect the grading of your
assignment.