# Affine Transformations in Practice

## Another Take on Affine Transformations

`The longest journey starts with but a single step.' What does this mean?

• Tx = Tsn ... Ts2 Ts1 x
• Any transformation can be constructed from a sequence of more elementary transformations.

Is there a small set of simple transformations from which all transformations can be constructed?

• Yes!!
• Should we thank heaven for making it so?
• Or geometers for discovering and exploring it?

If you are thinking about transformations as a group, this is something like the generators of the group.

• strictly speaking, a superset of the generators

#### Example

Translation is simple; rotation about a basis vector is simple. But rotation about an arbitrary axis is complex.

Construct rotation about an aribitrary axis from translation and rotation about a basis vector.

1. Translate the axis of rotation so that it passes through the origin.
2. Rotate the axis of rotation to coincide with the z-axis.
• First about the x-axis until it lies in the yz-plane
• Then about the y-axis until it lise along the z-axis
3. Rotate by the specified angle.
4. Undo the axis rotation.
5. Undo the translation.

Notice the structure, Tinv S T, which occurs over and over again.

## Specific Transformations You should Know

#### Transforming a the Coordinates of a Point

Inverse of transforming a frame

1. P = F p
• Maybe F is a 4D vector of vectors & points
• Maybe F is a 4x4 matrix
2. p' = T p
• T is the matrix that finds the coordinates of P in the new frame.
• We want to find out what T is.
3. P = F' p' = F' T p = F' T F^-1 P
4. Therefore, F' T F^-1 = I, and
• T = F'^-1 F, or
• p' = F'^-1 F p

#### Transforming a Frame

Inverse of transforming a point

1. F' = S F
• S is the matrix that transforms the coordinate frame
• We want to know what S is given P = F p = F' p'
2. P = F' p' = S F p'
3. Therefore F' = S F, and
• S = F^-1 F' = T^-1

## Rigid Transformations

Four transformations - identity, translation, rotation, reflection - have a special property

• They don't change the size or shape of the object.

All rigid transformations can be constructed from them.

• You must understand them both geometrically and algebraically.

#### Translation

Add a vector to a point, Ta

1. P' = P + a = Ta P
2. P' - P = TaP - P = a
3. Dot with i
• Txx Px + Txy Py + Txz Pz + Txo - Px = ax
• We get four equations
1. Txx - 1 = 0
2. Txy = 0
3. Txz = 0
4. Txo = ax
• Do it with j & k
• Finally, Tox Px + Toy Py + Toz Pz + Too = 1

What is the inverse?

What matrix transforms the frame?

What is the effect of Ta on a vector?

#### Reflection

Reflect in a plane, Fab

For example, choose the yz plane. Then

1. Px' = -Px; Py' = Py; Pz'=Pz
2. P' = Fjk P => P' - P = Fjk P - P
3. P' - P = -2 px i = Fjk P - P
4. Dot with i
1. -2Px = Fxx Px + Fxy Py + Fxz Pz + Fxo - Px
2. Four equations
1. Fxx = -1
2. Fxy = 0
3. Fxz = 0
4. Fxo = 0
3. etc

What is the inverse?

What matrix transforms the frame?

What is the effect of Fab on a vector?