Software Design
Fall 2004
Lab Exercise 12
Due: never!!!
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:
- Fiddle with parameters:
- Positional and directional lights.
- Colors, transparency, and material properties.
- Fog.
- Play with the objects:
- Write a new object type based on one of the other shapes
GLUT can draw.
- Use glutSolidCube along with glScale to write
a general function that can draw rectangonal polyhedra with arbitrary
dimensions.
- Create more cameras and see what the world looks like from
different angles. (Prepare yourself for a game of
`where's my teapot?!')
- If you are in the mood, think of a better way for worlds to
work with multiple cameras.
- 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.
- Modify Triangle so that it draws a square.
- Modify Orbit so that it draws a pleated orbit by raising
and lowering alternate vertices by a small amount.
- Use one style or the other to create a new kind of object.
Suggestion: try making a cylinder using GL_TRIANGLE_STRIP.
- Make an OpenGL world that is also a RemoteObject, and write
a client that can access it.
|