Announcements

Old TW code on Macs

The library programs (see the homework) and the tutors (we'll use some next week) can be compiled for the Mac. Follow the directions on our home page. Since these machines will not be refreshed this term, you'll only have to do this once. That will let you run the contributions and other old programs that haven't been ported to Python.

Running Python programs on Linux

I think I discussed this before, but just in case, I added explicit directions on how to run our Python programs on Linux.

Recap

New Material

Affine Transformations

The three transformations, which are all relatively intuitive individually, can all be forced into a single framework of matrix multiplications. We'll go in reverse order.

Matrix Multiplication

An L x M matrix, multiplied by an M x N matrix, yields an L x N matrix. We'll look at the general case for a few minutes.

In CG, our matrices are almost always 4x4 or smaller.

Scaling

Scaling can be done as a matrix multiplication. We'll see how. Imagine scaling the vectors (1,2) or (1,2,3). Generally, (a,b,c).

Rotation

Rotation can be done as a matrix multiplication. We'll see how. Imagine rotating the vectors (1,2) or (1,2,3) or (a,b,c) by, say, 90 degrees or 180 degrees or 45 degrees.

Translation

Amazingly, even translation can be done as a matrix multiplication, and we'll see how, using homogeneous coordinates.

Associativity of Matrix Multiplication

By making all our operations be matrix multiplications, we can represent and store the collective effect of a set of transformations, at significant savings in time and space

Also, the graphics card only has to store one matrix (the CTM), not ten. The CTM can be pushed onto and popped off of a stack.

This is the point of the Fence demo.

Display Lists

A display list captures some sequence of graphics operations in a way that the graphics pipeline can "replay" them later. They are useful when you're going to draw something more than once, as with the pickets in our picket fence.

Note, the CTM captures the current sequence of affine transformations, but the CTM is entirely distinct from display lists. Don't get the two confused.

Written by Scott D. Anderson
scott.anderson@acm.org
Creative Commons License
This work is licensed under a Creative Commons License.