## Affine Transformations

#### Definition

Given affine spaces A and B, A function F from A to B is an affine transformation if it preserves affine combinations. Mathematically, this means that

We can define the action of F on vectors in the affine space by defining

Where P and Q are any two points whose difference is the vector v (exercise: why is this definition independent of the particular choice of P and Q?)

There are two other important properties of affine transformations for the purposes of computer graphics. They are linear transformations on the underlying vector spaces. That is,

Also, they preserve the representation of affine points with respect to a given frame. In other words, the transformation of an affine point in a frame for A has the same affine coordinates in the image of that frame in B. In other words,

One nice aspect of this property is that once the image of the frame has been calculated, the structure of F is completely known. Remembering that an affine transformation is simply a linear transformation over the corresponding homegeneous coordinate space, this is simply the statement that a linear transformation can be completely understood by its action on a basis.

## Understanding Affine Transformations

Unlike general projective transformations, affine transformations are relatively simple to visualize. The affine plane is not that different from our familiar Cartesian plane. The only real difference is the lack of an origin. Since operations such as scaling and rotation are defined in terms of the origin in the Cartesian world, our calculations become more complicated.

If we impose the usual Cartesian coordinates on the affine plane, any affine transformation can be expressed as a linear transformation followed by a translation. Note that translations cannot be expressed as linear transformations in Cartesian coordinates. Once we move up to the general affine space, all these transformations become linear.

Note, too, that we can express affine transformations as matrix multiplications (i.e., linear transformations) in homogeneous coordinates. They are a special case of matrices in homogeneous coordinates; they map points with w = 1 to points with w = 1.

## Properties of Affine Transformations

Hyperplanes Map to Hyperplanes:
In particular, points map to points, line map to lines and planes map to planes. Also, line segments map to line segments. This can be seen to be true by observing that

One nice consequence of this fact is that one can calculate the image of a polygon by simply computing the images of its vertices.

Parallelism is Preserved:
Two vectors which are parallel will have parallel images under an affine transformation F:

Thus, parallelograms map to parallelograms and ellipses map to ellipses.

Ratios are Preserved:
This does not mean that ratios between lengths of line segments are preserved. Ratios are preserved in the sense of interpolation. That is, if the point R is x of the way from P to Q, and F is an affine transformation, then F(R) is x of the way from F(P) to F(Q).One implication of this is that an object moving at a constant speed gets mapped to an object moving at a constant speed.