Description
This lab will introduce you to transformation hierarchies
with OpenGL.
For this lab assignment you will be required to create and
animate an object by transforming a set of basic geometric
primitives. You will learn how to combine transformations to
position and orient objects in 3D space, as well as how to
make those objects move. After completing the lab, you should
understand what a transformation hierarchy is.
You will be allowed to choose the type of object you wish to
model and animate; however, they must be subject to the
following restrictions:
-
You must use glTranslatef, glRotatef, glScalef,
glPushMatrix and glPopMatrix at least once.
-
Your object must have a transformation hierarchy at
least 2 levels deep. In other words, your object must be
composed of subobjects thats transform relative to each
other in some hierarchical manner. e.g. A vehicle with wheels that
rotate relative to the chassis of the vehicle, or a moon
that rotates about a planet.
-
One object must have at least two objects below it in the hierarchy, i.e. a planet with two moons orbiting it, or at least two wheels on a vehicle.
-
Your object must animate. You should use
the realtime timer provided in timer.h to synchronize
your motion with real-world time; otherwise, your
animation will run as fast as the machine can render.
Here are some examples of interesting objects which meet the
requirements:
-
The planets and moons of our solar system.
You will not need to animate all moons (1 is
sufficient).
-
A car or other similar vehicle that
moves around the screen. You can bind the
movement to the keyboard.
-
A movable, articulated robot arm.
Code
As with prior labs, you will need to download
starter code OpenGL 3D viewer code. This code will provide you with a functional
3D OpenGL viewer as well as a realtime timer that you will need.
Submission Instructions
I will check off the labs when you are done.
External Resources