When talking about geometric transformations, we have to be very careful about the object being transformed. We have two alternatives, either the geometric objects are transformed or the coordinate system is transformed. These two are very closely related; but, the formulae that carry out the job are different. We only cover transforming geometric objects here.

We shall start with the traditional Euclidean transformations that do not change lengths and angle measures, followed by affine transformation. Finally, we shall talk about projective transformations.

Therefore, if a line has an equation *Ax + By + C* = 0, after plugging
the formulae for *x* and *y*, the line has a new equation
*Ax' + By' + *(*-Ah - Bk + C*) = 0.

If a point (*x, y*) is rotated an angle *a* about the coordinate
origin to become a new point (*x', y'*), the relationships can be
described as follows:

Thus, rotating a line *Ax + By + C* = 0 about the origin *a* degree
brings it to a new equation:

(Acosa-Bsina)x'+ (Asina+Bcosa)y'+C= 0

Translations and rotations can be combined into a single equation like the following:

The above means that rotates the point (*x*,*y*) an angle *a*
about the coordinate origin and translates the rotated result in the direction
of (*h*,*k*). However, if translation (*h*,*k*) is
applied first followed by a rotation of angle *a* (about the coordinate
origin), we will have the following:

Therefore, rotation and translation are not commutative!

In the above discussion, we always present two matrices, **A** and
**B**, one for transforming **x** to **x'** (*i.e.*,
**x'**=**Ax**) and the other for transforming **x'** to **x**
(*i.e.*, **x**=**Bx'**). You can verify that the product of
**A** and **B** is the identity matrix. In other words, **A** and
**B** are inverse matrices of each other. Therefore, if we know one
of them, the other is the inverse of the given one. For example, if you know
**A** that transforms **x** to **x'**, the matrix that transforms
**x'** back to **x** is the inverse of **A**.

Let **R** be a transformation matrix sending **x'** to **x**:
**x**=**Rx'**. Plugging this equation of **x** into a
conic equation gives the following:

Rearranging terms yields

This is the new equation of the given conic after the specified transformation. Note that the new 3-by-3 symmetric matrix that represents the conic in a new position is the following:

Now you see the power of matrices in describing the concept of transformation.

The above translates points by adding a vector <*p, q, r*>.

Rotations in space are more complex, because we can either rotate about
the *x*-axis, the *y*-axis or the *z*-axis. When rotating
about the *z*-axis, only coordinates of *x* and *y* will change
and the *z*-coordinate will be the same. In effect, it is exactly a
rotation about the origin in the *xy*-plane. Therefore, the rotation
equation is

With this set of equations, letting *a* be 90 degree rotates
(1,0,0) to (0,1,0) and (0,1,0) to (-1,0,0). Therefore, the *x*-axis
rotates to the *y*-axis and the *y*-axis rotates to the
negative direction of the original *x*-axis. This is the effect of
rotating about the *z*-axis 90 degree.

Based on the same idea, rotating about the *x*-axis an angle *a*
is the following:

Let us verify the above again with *a* being 90 degree. This rotates
(0,1,0) to (0,0,1) and (0,0,1) to (0,-1,0). Thus, the *y*-axis rotates
to the *z*-axis and the *z*-axis rotates to the negative direction
of the original *y*-axis.

But, rotating about the *y*-axis is different!
It is because the way of measuring angles. In a right-handed system, if your
right hand holds a coordinate axis with your thumb pointing in the positive
direction, your other four fingers give the positive direction of angle
measuring. More precisely, the positive direction for measuring angles is
from the *z*-axis to *x*-axis. However, traditionally the
angle measure is from the *x*-axis to the *z*-axis.
As a result, rotating an angle *a* about the *y*-axis in the sense
of a right-handed system is equivalent to rotating an angle *-a*
measuring from the *x*-axis to the *z*-axis.
Therefore, the rotation equations are

Let us verify the above with rotating about the *y*-axis 90 degree.
This rotates (1,0,0) to (0,0,-1) and (0,0,1) to (1,0,0). Therefore,
the *x*-axis rotates to the negative direction of the *z*-axis
and the *z*-axis rotates to the original *x*-axis.

A rotation matrix and a translation matrix can be combined into a single
matrix as follows, where the *r*'s in the upper-left 3-by-3 matrix
form a rotation and *p*, *q* and *r* form a translation
vector. This matrix represents rotations followed by a translation.

You can apply this transformation to a plane and a quadric surface just as what we did for lines and conics earlier.

Scaling can be applied to all axes, each with a different
*scaling factor*. For example, if the *x*-, *y*- and
*z*-axis are scaled with scaling factors *p*, *q* and
*r*, respectively, the transformation matrix is:

How far a direction is pushed is determined by a
*shearing factor*. On the *xy*-plane, one can push in the
*x*-direction, positive or negative, and keep the *y*-direction
unchanged. Or, one can push in the *y*-direction and keep the
*x*-direction fixed. The following is a shear transformation in the
*x*-direction with shearing factor *a*:

The shear transformation in the *y*-direction with shearing factor
*b* is the following:

In space, one can push in two coordinate axis directions and keep the third
one fixed. The following is the shear transformation in both *x*-
and *y*-directions with shearing factors *a* and *b*,
respectively, keeping the *z*-coordinate the same:

Let us take a look at the effect of this shear transformation. Expanding the matrix equation gives the following:

Thus, a point (x'=x+az

y'=y+bz

z'=z

The following is the shear transformation in *xz*-direction:

The following is the shear transformation in *yz*-direction:

Comparing with all previous discussed matrices, rotations and translations included, you will see that all of them fit into this form and hence are affine transformations. Affine transformations do not alter the degree of a polynomial, parallel lines/planes are transformed to parallel lines/planes, and intersecting lines/plane are transformed to intersecting lines and planes. However, affine transformations do not preserve lengths and angle measures and as a result they will change the shape of a geometric object. The following shows the result of a affine transformation applied to a torus. A torus is described by a degree four polynomial. The red surface is still of degree four; but, its shape is changed by an affine transformation.

Note that the matrix form of an affine transformation is a 4-by-4 matrix
with the fourth row 0, 0, 0 and 1. Moreover, if the inverse of an affine
transformation exists, this affine transformation is referred to as
*non-singular*; otherwise, it is *singular*. We do not use
singular affine transformations in this course.

In the above, the 4-by-4 matrices must be non-singular (*i.e.*,
invertible). Therefore, projective
transformations are more general than affine transformations because the
fourth row does not have to contain 0, 0, 0 and 1.

Projective transformation can bring finite points to infinity and points at infinity to finite range. Let us take a look at an example. Consider the following projective transformation:

Obviously, this transformation sends (*x,y,w*)=(1,0,1) to
(*x',y',w'*) = (1,-1,0). That is, this projective transformation sends
(1,0) on the *xy*-plane to the point at infinity in direction
<1,-1>. From the right-hand side of the matrix equation **x**=**Px'**
we have

Let us consider a circlex= 2x' + y'

y=x' + y'

w= 2x' + y' + w'

Dividing the above byx^{2}+ 2xy+y^{2}- 4xw- 2yw-w^{2}= 0

This is a parabola! (Why?) Therefore, a circle that has no point at infinity is transformed to a parabola that does have point at infinity.x^{2}+ 2xy+y^{2}- 4x- 2y- 1 = 0

While projective transformations, like affine transformations, do not
change the degree of a polynomial, two parallel (*i.e.*, intersecting)
lines/planes can be transformed to two intersecting (*i.e.*, parallel)
lines/planes. Please verify this fact yourself.

Although we do not use these facts and the concept of projective transformations immediately, it will be very helpful in later lectures.

Therefore, to compute the net effect, we just computes=Cr=C(Bq) =CBq=CB(Ap) =CBAp

Let us take a look at an example. We want to perform the following transformations to an object:

- Scale in the
*x*-direction using a scale factor 5 (*i.e.*, making it five times larger). - Followed by a rotation about
*z*-axis 30 degree - Followed by a shear transformation in
*x*- and*y*-direction with shearing factor 2 and 3, respectively. - Followed by a transformation moving the point in the direction of < 2, 1, 2 >.

Therefore, the net effect of transforming a point **x** of the initial
object to the corresponding point **x'** after the above four
transformations is computed as **x'** = **Hx** = **DCBAx**.