Assignment 2
Due: Thuesday 4/2
Model hierarchically a 3D scene that consists of a
road, a car , and at least 2 trees along the
road. Each component should have a different color than the rest. All
trees may have the same colors, and all wheels may have the same
color. Write an OpenGL program that displays the scene. Animage the car
(drive it around the road)
Submit: The source code and the report in hard copy;
email the source code. In the reopert in addition to the usual things (what you did, how you did
it, any special features, any problems), draw by hand the tree of
transformations you used to represent the hierarchical model and label
it
The following is a minimum specification . You might have more
sophisticated design, i.e. more complex objects and/or more objects in
the scene.
Keep in mind that in a following assignment you will add
interactive interface to your program to drive the car along the road,
and to view the scene from various view points. This is why it is
important to have modular design so you can extend/make changes
easier.
Specifications
- A car has a rectangular body and 4 wheels, body and wheels have different
colors.
- A tree has a trunk (cylinder or a cone) and a crown (a sphere). The trunk and the
crown have different colors. Use a display list to model a generic tree.
Use transformations to make the two trees look different in shape.
- The road goes in a circular loop or is a straight rectangular strip.
- Model each object in its own local coordinates system, that is most convenient for you.
- Use transformations to position the instances of the objects in the scene.
- Use functions or display list for modeling various components.
- Use glu and glut functions for modeling some of the geometric objects.