Second Programming Assignment: Modelling in OpenGL

Due Date: Wednesday, March 4


Last modified: "March 4, 1998 14:56:44 by matt"

Using OpenGL, display a model of your bedroom. The bedroom should contain at least a chair, a bed, and a desk/table. The room should have four walls and a floor. In the wall you should have a door and a window.

To receive an A, your program must provide all of the following capabilities:

  1. The objects identified above.
  2. You must provide some kind of mechanism for animating one of the objects in the room. The animation can consist of the object moving, rotating, scaling. Anything to cause the image to be dynamic.
  3. You must provide a mechanism for pick correlation. E.g., clicking on a chair in the room should cause "Chair" (or some such phrase) to appear in your standard output window.
Extra credit: A room fly-through. This is really just another form of animation. Instead of altering the model, you iteratively alter the camera's position, redisplaying the model at each step. The fly-through does not have to be particularly complicated (a straight line trajectory for the camera is just fine), but shouldn't be too herky-jerky (i.e., don't move the camera too much between each frame).

HINTS:

I've defined a new graphic object: glutSolidRect and glutWireRect each take three arguments, specifying the size of a rectangular parallelpiped along the x,y,and z axes.

If you're going to do any scaling, make sure you use glEnable(GL_NORMALIZE) in your code.

Check out my modified version of Angel's figure.c, /usr/tools/cse.pub/matt/Graphics/figure-rects.c. It includes hierarchical modelling stuff, and use of glutSolidRect.

Suggested Route: Start with any of the Glut demo programs that provides a reasonable 3D image.

DEMOS: You will demonstrate your programs to me to show that they work correctly. These demonstrations may be videotaped. (We collect the best efforts for use in other classes.)