CS184 Lecture 6 summary

Homogeneous coordinates, 3D Transformations and coordinate frames.

3D translation can be represented as vector addition. 3D rotation is represented by a matrix multiply v' = Rv.

Recall that rotation matrices are 3x3 and satisfy RRT = I, or R-1 = RT .

Homogeneous coordinates for 3D points. Representation of pure translation and pure rotation as 4x4 matrices.

4x4 matrix representing both rotation and translation.

Any rigid 3D transformation can be represented by one of these matrices (note that reflections preserve distance, but cannot be done continuously).

Order of transformations in a sequence of matrix multiplies - right to left.

The other important 3D transformation is scaling. We can implement scaling along the axes using a diagonal matrix. Scaling in other directions using a sequence of scaling and rotations.

The book also describes shear transformations. Is there a difference between scaling+rotations and shearing?

Coordinate Frames

Think of the 3x3 identity matrix I as 3 column vectors [X Y Z] where X, Y, Z are unit vectors along the axes, which define a coordinate frame centered at the origin. Applying a rotation R, the frame becomes [X' Y' Z'] where X' = RX, Y' = RY, Z' = RZ. But X', Y' Z' are just the columns of R, that is R = [X' Y' Z']. So R is an explicit representation for a coordinate rotation, and vice versa.

Let v be a vector in the [X Y Z]-coordinate system describing a point p. In the R = [X' Y' Z']-coordinate system, this point has coordinates R-1v. That follows because applying R to both the p and the coordinates [X' Y' Z'] moves the latter to normal coordinates [X Y Z], from which point the coordinates of p can be read off.

A general 3D coordinate frame can be described by the directions of its axes X' Y' Z' and the position of its origin t. It corresponds to a 4x4 homogeneous transformation matrix which we could write as T = [X' Y' Z' t] (with an implicit 0 0 0 1 on the last row which we dont write because it never changes).

For a point with homogeneous coordinates v in the usual coordinate frame [X Y Z 0], its coordinates in the frame T = [X' Y' Z' t] are given by T-1v.

In graphics, there are at least 3 important coordinate frames: object, world and viewer. Most of our VRML examples have applied transforms to displace the object coordinate frame relative to the world. The Viewer node specifies the relationship between viewer and world.

Transformations are naturally transitive. You can think about 3 coordinate systems in the same world.