Transformation Hierarchies with OpenGL
This lab will introduce you to transformation hierarchies with OpenGL. 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.
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.
- 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.
Useful Links
The first two links are essential to understanding to understanding OpenGL. I strongly encourage that you explore these two resources if you are interested in using OpenGL beyond this course.
OpenGL User Guide (Redbook)OpenGL Reference Manual (Bluebook)
GLUT Specifications