2-d Transformations

Matrix Notation

A scaling transformation can be represented as a multiplication of a row vector by a 2x2 matrix:

Rotation may be represented similarly:

It is even possible to combine transformations represented in this way be multiplying their respective matrices together. This is a very hopeful sign, if we can represent the operations of scaling, rotation and translation all as matrices, and use matrix multiplication to combine them, we will have a very powerful system for manipulating picture structures.

Unfortunately, translation does not fit into our tentative scheme. A translation cannot be represented by a 2x2 matrix. To see why this is so we must realise that a 2x2 matrix is actually generating a linear combination of its inputs, i.e.:

In such a combination, there is no way to represent a term which is independent of both x and y. Translation, however, requires exactly this capability from the transformation apparatus:

A and b are neither coefficients of x or y, this is an Affine Transformation.

We will consider various alternative representations which will allow translations to be represented along with rotations and scaling. One possible approach is to use different operations for the composition of different types of transformation, multiplication for rotation and scaling, with addition reserved for translation.

This is a poor solution, however, because we loose the ability to combine arbitrary transformations into complex ``meta'' transformations. Such an ability is likely to be important, so we will try another approach.

We can force translation to become a matrix multiplication:

This is better, but we still can't multiply translation matrices by rotation and scaling matrices. Also, the vector ``input'' to this system has a different dimensionality to that which is ``output'', a fact which is untidy, to say the least.

Our problems are solved if we realise that we could make the translation matrix a 3x3 square.

Now the input and output vectors have the same size, we can compose translations by multiplying their matrices, and, best of all, we can convert rotation and scaling matrices into 3x3 form and find that all types of transformation matrices can be composed by matrix multiplication.

The three types of transformation matrix are, expressed in 3x3 form:

Translation by a, b:

Rotation by :

Scaling by and :

[x,y,1] is called the homogeneous form of the point .


From Colin Flanagan -- see details
26.11.1996