2-D Transformations

Tom Kelliher, CS 320

Apr. 26, 2000

Administrivia

Announcements

Evaluations Friday.

Lab day Friday.

Assignment

From Last Time

cube.c

Outline

  1. Homogeneous coordinates.

  2. Composing transformations.

Coming Up

Lab day.

2-D Transformations

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:

A scaling:

A rotation:

Recall:

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?

  3. Consider the order of transformation application:
    1. Transformation 1: Translate +5 units in X dimension.

    2. Transformation 2: Rotate 45 degrees CCW.

  4. The new current modelview matrix, C, is formed by multiplying the transformation matrix T like so:

    So, a point, v, ``sees'' the transformation:

    If I want to apply the transformations , , and , in what order do I perform the modelview multiplications?



Thomas P. Kelliher
Wed Apr 26 12:06:50 EDT 2000
Tom Kelliher