Videos

SIGGRAPH '89 Electronic Theatre:




Assignment 1







Hierarchical Transformations

Hierarchical transformations can be thought of as transformations that are "attached to" other transformations.

They are used to transform objects relative to other objects.

A common use is in articulated bodies.


Adventures of Prince Achmed, Lotte Reiniger





Hierarchical Transformations

We can draw this "car" by transforming the two wheels relative to the body of the car.

We'd like each wheel to be affected by the car body's transformation, but not by any other wheel's transformation.






Hierarchical Transformations

The basic tool needed is commands to save & restore transformation state.

apply body transformation
draw body
save state
apply front wheel transformation
draw wheel
restore saved state
apply rear wheel transformation
draw wheel





PushMatrix / PopMatrix

A transformation is represented mathematically as a matrix.

OpenGL maintains a stack of saved transformation matrices.

glPushMatrix() & glPopMatrix() save and restore transformation state.



Make sure you always have the same number of pushes & pops.

The number of transformations you can save is finite; it is at least 32.






Transformation Hierarchy

Hierarchical transformations are often represented as a tree of transformations.

This is the basis of scene graph systems.






Assignment 2

DUE: Thursday, 6 October 2005, 11:59:59 pm
  (via e-mail, to depape@buffalo.edu)

Create a program with lots of motion

The program should use OpenGL geometry (GL_LINES, GL_TRIANGLES, etc)
It can also include images (e.g. a background)

There should be at least 10 shapes; not all of them have to move

The motion can be defined by mathematical formulas, or algorithmically

Try to make the motion complex, but interesting.

Extra credit will be given for interaction - some of the motion (or other dynamic features, such as color) responding to user input, in a non-trivial way.

Creative Commons License
This document is by Dave Pape, and is released under a Creative Commons License.