2-D Transformations

Tom Kelliher, CS 320

Feb. 28, 2001

Administrivia

Announcements

Assignment

Read 4.6--9.

From Last Time

Animation: rotating square, pong project.

Outline

  1. 2-D transformations: rotation, translation, scaling.

Coming Up

Concatenation of transformations, transformation matrices.

2-D Transformations

Three primitive transformation:

  1. Rotation.

  2. Scaling.

  3. Translation.

We'll consider each in turn.

The idea is to perform all transformations via matrix multiplications:

Preliminaries

For now, we assume you're familiar with:

  1. Vector spaces and their properties.

  2. Dot product.

  3. Magnitude of a vector: .

  4. Angle between two vectors:

  5. Properties of matrices.

  6. Some trigonometry:

We're all probably somewhat rusty. I know I am.

Rotation

Consider rotating the point by about the origin.

With a little magic:

What's our transformation matrix look like?

Scaling

  1. ``Contract'' or ``expand'' a point (polygon).

  2. Point moves in relation to origin.

  3. Differential, uniform scalings.

Matrix representation?

Translation

Move the point:

Matrix representation?

Homogeneous Coordinates

  1. Use allows use to achieve translations via matrix multiplications.

  2. Add a third coordinate to a point: .

  3. Two sets of homogeneous coordinates represent the same point iff they are multiples of each other.

  4. A ``homogenized'' point.

Our translation:

Composing Transformations

Can we combine transformations?

  1. Consider composing two translations: , and , .

  2. Consider two scalings.

  3. Consider two rotations.

Types of Transformations

  1. Rigid body. Arbitrary sequence of translations and rotations.

  2. Affine. Parallelism of lines preserved, but not lengths nor angles.

  3. Shear (affine).

    Consider the x-shear transformation:

What's the y-shear transformation matrix look like?

General Compositions

  1. How do we rotate about an arbitrary point?

  2. How do we scale about an arbitrary point?



Thomas P. Kelliher
Wed Feb 28 10:09:25 EST 2001
Tom Kelliher