Software Design
Fall 2004

Lab Exercise 12

Due: never!!!

Teapots

Download the latest and greatest version of

wget http://wb/sd/code/Teapot.py
If you run the new version, the objects should be shiny and there should be a big blue triangle sticking out of the sun. Watch the blue triangle for a while; it has a special feature!

Depending on your interests, try some or all of the following:

  1. Fiddle with parameters:

    1. Positional and directional lights.

    2. Colors, transparency, and material properties.

    3. Fog.

  2. Play with the objects:

    1. Write a new object type based on one of the other shapes GLUT can draw.

    2. Use glutSolidCube along with glScale to write a general function that can draw rectangonal polyhedra with arbitrary dimensions.

    3. Create more cameras and see what the world looks like from different angles. (Prepare yourself for a game of `where's my teapot?!')

    4. If you are in the mood, think of a better way for worlds to work with multiple cameras.

  3. Create new objects:

    The Triangle and Orbit objects demonstrate two ways to create objects by specifying vertices. Read the documentation of glBegin and glVertex, and then read Triangle and Orbit.

    1. Modify Triangle so that it draws a square.

    2. Modify Orbit so that it draws a pleated orbit by raising and lowering alternate vertices by a small amount.

    3. Use one style or the other to create a new kind of object. Suggestion: try making a cylinder using GL_TRIANGLE_STRIP.

  4. Make an OpenGL world that is also a RemoteObject, and write a client that can access it.