






Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Rigid transformations in 3D, which preserve distances and angles between points. It covers the cosine law, orthogonal decomposition, and classification of linear rigid transformations. The document also includes exercises and a PostScript procedure for calculating rotations.
Typology: Summaries
1 / 11
This page cannot be seen from the preview
Don't miss anything!







We are about to start drawing figures in 3D. There are no built-in routines for this purpose in PostScript, and we
shall have to start more or less from scratch in extending the language to do the job we want done. Figures in
3D are a great deal more complicated than ones in 2D, and there are a number of new mathematical ideas to be
introduced.
The biggest problem in 3D is you can’t represent an object exactly, since in drawing it you must collapse it to 2D.
Nonetheless this aim is not entirely unreasonable, because of course our eyes render the world on the back of the
retina, itself a two-dimensional surface. But what we need to do to make the illusion work is to move objects
around as we look at them, or at least allow for this possibility; and introduce shadows and other responses to
light to create a perception of depth.
In the next chapter we shall describe in detail how we arrange viewing things in space. In this one we shall
describe how things move around without distortion. It is useful to discuss this in dimensions one and two as
well as three.
1. Rigid transformations
If we move an object around normally, it will in some sense remain rigid, and will not distort. Here is the technical
way we formulate rigidity: Suppose we move an object from one position to another. In this process, any point
P of the object will be moved to another point P∗. We shall say that the points of the object are transformed into
other points. A transformation is said to be rigid if it preserves relative distances—that is to say, if P and Q are
transformed to P∗ and Q∗ then the distance from P to Q is the same as that from P∗ to Q∗.
We shall make an extra assumption about rigid transformations. It happens that it is a redundant assumption,
since it can be proven that every rigid transformation satisfies this condition. We shallnot prove it, however,
because it would require a long digression, and instead just take it more or less for granted.
The condition is this:All the rigid transformations we consider will be affine. This means that if we have chosen
a linear coordinate system in whatever set we are looking at (a line, a plane, or space). then the transformation
P 7 → P∗ is calculated in terms of coordinate vectors x and x∗ according to the formula
x∗ = Ax + v
where A is a matrix and v a vector. In 3D, for example, we require
x 1
x 2
x 3
x 1
x 2
x 3
v 1
v 2
v 3
It turns out that all rigid transformations are in fact affine, but we shall not worry about that here. The matrix A
is called the linear component , v the translation component of the transformation.
That is to say, if P , Q and R are three points transformed to P∗, Q∗, and R∗, then the angle θ between segments
P Q and P R is the same as the angle θ∗ between P∗Q∗ and P∗R∗. This is because of the cosine law, which says
that
cos θ =
2 − ‖P Q‖
2 − ‖P R‖
2
2 − ‖P∗Q∗‖
2 − ‖P∗R∗‖
2
= cos θ∗.
A few other facts are more elementary:
In the second statement, it is implicit that a rigid transformation has an inverse. This is easy to demonstrate.
An affine transformation will be rigid when its linear component is, since a translation will certainly not distort
lengths. But if its linear component does not have an inverse, then it is singular , which means that it will collapse
some line, at least, onto a point. Then it cannot preserve lengths, which is a contradiction.
In order to classify rigid transformations, which is what we shall now do, we must thus classify the linear ones.
Exercise 1.1. The inverse of the transformation x 7 → Ax + v is also affine. What are its linear and translation
components?
2. Dot and cross products
A bit later we shall need to know some basic facts about vector algebra. In any number of dimensions we define
the dot product of two vectors
u = (x 1 , x 2... , xn), v = (y 1 , y 2 ,... , yn)
to be
u •^ v = x 1 y 1 + x 2 y 2 + · · · xnyn.
The relation between dot products and geometry is expressed by the cosine rule for triangles, which asserts that
if θ is the angle between u and v then
cos θ =
u •^ v
‖u‖ ‖v‖
In particular u and v are perpendicular when u •^ v = 0.
In 3 D there is another kind of product. If
u = (x 1 , x 2 , x 3 ), v = (y 1 , y 2 , y 3 )
then their cross product u × v is the vector
(x 2 y 3 − y 2 x 3 , x 3 y 1 − x 1 y 3 , x 1 y 2 − x 2 y 1 ).
This formula can be remembered if we write the vectors u and v in a 2 × 3 matrix
[ x 1 x 2 x 3
y 1 y 2 y 3
and then for each column of this matrix calculate the determinant of the 2 × 2 matrix we get by crossing out in
turn each of the columns. The only tricky part is thatwith the middle coefficient we must reverse sign. Thus
u × v =
x 2 x 3
y 2 y 3
x 1 x 3
y 1 y 3
x 1 x 2
y 1 y 2
Here (^) ∣ ∣ ∣ ∣
a b
c d
= ad − bc.
The geometrical significance of the cross product is contained in these rules:
The vector u has the orthogonal decomposition
u = u 0 + u⊥
and therefore we can calculate
u⊥ = u − u 0.
(3) Finally, let u∗ be the vector in Π we get by rotating u∗ by 90
◦ in Π, using the right hand rule to determine what
direction of rotation is positive.
How do we calculate u∗? We want it to be perpendicular to both α and u⊥, so it ought to be related to the cross
product α × u⊥. A little thought should convince you that in fact the direction of u∗ will be the same as that of
α × u⊥, so that u∗ will be a positive multiple of α × u⊥. We want u∗ to have the same length as u⊥. Since α and
u⊥ are perpendicular to each other, the length of the cross product is equal to the product of the lengths of α and
u⊥, and we must divide by ‖α‖ to get a vector of length ‖u⊥. Therefore, all in all
u∗ =
α
‖α‖
× u⊥.
Incidentally, in all of this discussion it is only the direction of α that plays a role. It is often useful to normalize α
right at the beginning of these calculations, that is to say replace α by α/‖α‖.
Exercise 2.1. Write PostScript programs to calculate dot products, cross products, u 0 , u⊥ , u∗.
3. The classification of linear rigid transformations
Let A be an n × n matrix.
a 1 , 1 a 1 , 2... a 1 ,n
a 2 , 1 a 2 , 2... a 2 ,n
...
an, 1 an, 2... an,n
Let ei be the column vector with exactly one non-zero coordinate equal to 1 in the i-th place. Then Aei is equal
to the i-th column of A. The transformation corresponding to A takes the origin to itself, and the length of ei is
The angle between ei and ej is 90
◦ if i 6 = j, and therefore the angle between the i-th and j-th columns of A is also
90
◦ .
Since the square of the length of a vector u is equal to the dot product u •^ u, and the angle between two vectors of
length 1 is given by their dot product u •^ v, this means that the columns ui of A satisfy the relations
ui •^ uj =
1 i = j
0 otherwise
Any matrix A satisfying these conditions is said to be orthogonal. The transpose t A of a matrix A is obtained by
flipping A along its diagonal. In other words, the rows of t A are the columns of A, and vice-versa. By definition
of the matrix product t A A, its entries are the various dot products of the columns of A with the rows of t A.
Therefore a matrix A is orthogonal if and only if
t A A = I, A
t A.
If A and B are two n × n matrices, then
det(AB) = det(A) det(B).
The determinant of A is the same as that of its transpose. If A is an orthogonal matrix, then
det(I) = det(A) det(
t A) = det(A)
2
so that det(A) = ± 1. If det(A) = 1, A is said to preserve orientation , otherwise reverse orientation. There is
a serious qualitative difference between the two types. If we start with an object in one position and move it
continuously, then the transformation describing its motion will be a continuous family of rigid transformations.
The linear component at the beginning is the identity matrix, with determinant 1. Since the family varies
continuously, the linear component can never change the sign of its determinant, and must therefore always be
orientation preserving. A way to change orientation would be to reflect the object, as if in a mirror.
4. Orthogonal transformations in 2D
In 2D the classification of orthogonal transformations is very simple. First of all, we can rotate an object through
some angle (possibly 0
◦ ).
This preserves orientation. The matrix of this transformation is, as we saw much earlier,
cos θ − sin θ
sin θ cos θ
Second, we can reflect things in an arbitrary line.
α
Choose an angle θ. Rotate things around the axis through angle θ, in the positive direction as seen along the axis
from the positive direction. This is called an axial rotation.
We shall give two proofs, one algebraic and the other geometric. But we postpone both until later in the chapter.
6. Calculating the effect of axial rotations
To begin this section, I remark again that to determine an axial rotation we must specify not only an axis but a
direction on that axis. This is because the sign of a rotation in 3 D is only determined if we know whether it is
assigned by a left hand or right hand rule. At any rate if choosing a vector along an axis fixes a direction on it.
Given a direction on an axis we shall adopt the convention that the direction of positive rotation follows the right
hand rule.
So now the question we want to answer is this:Given a vector α 6 = 0 and an angle θ. If u is any vector in space
and we rotate u around the axis through α by θ , what new point v do we get? This is one of the main calculations
we will make to draw moved or moving objects in 3 D.
There are some cases which are simple. If u lies on the axis, it is fixed by the rotation. If it lies on the plane
perpendicular to α it is rotated by θ in that plane (with the direction of positive rotation determined by the right
hand rule).
If u is an arbitrary vector, we express it as a sum of two vectors, one along the axis and one perpendicular to it,
and then use linearity to find the effect of the rotation on it.
To be precise, let R be the rotation we are considering. Given u we can find its projection onto the axis along α to
be
u 0 =
α •^ u
α •^ α
α
Its projection u⊥ is then u − u 0. We write
u = u 0 + u⊥
Ru = Ru 0 + Ru⊥
= u 0 + Ru⊥.
How can we find Ru⊥?
Normalize α so ‖α‖ = 1, in effect replacing α by α/‖α‖. This normalized vector has the same direction and axis
as α. The vector u∗ = α × u⊥ will then be perpendicular to both α and to u⊥ and will have the same length as
u⊥. The plane perpendicular to α is spanned by u⊥ and u∗, which are perpendicular to each other and have the
same length. The following picture shows what we are looking at from on top of α.
u⊥
u∗
It shows:
Ru⊥ = (cos θ) u⊥ + (sin θ) u∗.
In summary:
(1) Normalize α, replacing α by α/‖α‖.
(2) Calculate
u 0 =
α •^ u
α •^ α
α.
(3) Calculate
u⊥ = u − u 0.
(4) Calculate
u∗ = α × u⊥.
(5) Finally set
Ru = u 0 + (cos θ) u⊥ + (sin θ) u∗.
Exercise 6.1. What do we get if we rotate the vector (1, 0 , 0) around the axis through (1, 1 , 0) by 36
◦ ?
Exercise 6.2. Write a PostScript procedure with α and θ as arguments and returns the matrix associated to
rotation by θ around α.
7. Eigenvalues and rotations
In this section we shall see the first proof that all linear, rigid, orientation-preserving transformations are axial
rotations. It requires the notions of eigenvalue and eigenvector.
If T is any linear operator, an eigenvector of T is a vector v 6 = 0 such that T v is a scalar multiple of v:
T v = cv.
the number c is called the eigenvalue corresponding to v.
If A is a matrix representing T , then the eigenvalues of T are the roots of the characteristic polynomial
det(A − xI)
9. Euler’s Theorem
The fact that every orthogonal matrix with determinant 1 is an axial rotation may seem quite reasonable, after
some thought about what else might such a linear transformation be, but I claim that it is not quite intuitive. To
demonstrate this, let me point out that it implies thatthe combination of two rotations around distinct axes is
again a rotation. This is not at all obvious, and in particular it is difficult to see what the axis of the combination
should be. This axis was constructed geometrically by Euler.
P 1
P 2
Let P 1 and P 2 be points on the unit sphere. Suppose P 1 is on the axis of a rotation of angle θ 1 , P 2 that of a rotation
of angle θ 2. Draw the spherical arc from P 1 to P 2. On either side of this arc, at P 1 draw arcs making an angle of
θ 1 / 2 and at P 2 draw arcs making an angle of θ 2 / 2. Let these side arcs intersect at α and β on the unit sphere. The
the rotation R 1 around P 1 rotates α to β, and the rotation R 2 around P 2 moves β back to α. Therefore α is fixed
by the composition R 2 R 1 , and must be on its axis.
Exercise 9.1. What is the axis of R 1 R 2? Prove geometrically that generally
Given Euler’s Theorem, we can finish our second proof that all linear rigid transformations in 3D are axial
rotations by showing the following to be true:
Let T be the given linear rigid transformation. Let N be the ‘north pole’ (0, 0 , 1), S the ‘south pole’ (0, 0 , −1), E
the corresponding ‘equator’ on the unit sphere. If T N = N , then T itself must be just a rotation around the N S
axis. If T N 6 = N , then a single rotation A around an axis through opposite points of E will bring T N up to N ,
but then T A must be an axial rotation B, and T = BA
− 1 .
10. Linear transformations and matrices
There is one point we have been a bit careless about. Suppose T to be a rigid linear transformation. It has been
asserted that if T v = v then T preserves orientation on the plane through the origin perpendicular to v, and if
T v = −v then it reverses orientation on that plane. Why exactly is this? It depends on a fundamental but difficult
point about the relationship between linear transformations and matrices.
There is no canonical way to associate a matrix to a linear transformation, A linear transformation is a geometrical
thing—it rotates or reflects or scales or shears in some way. A matrix is in some sense the set of coordinates of the
transformation. Something similar happens with vectors which are also geometrical things, possessing, as you are
told in physics courses, direction and magnitude. In order to assign coordinates to a vector we must choose first
a coordinate system. There is really no best way to do this, and in some sense large classes of coordinate systems
are equivalent. Likewise, to assign a matrix to a linear transformation we must first choose a coordinate system.
If we do that, say in space, then we can define three special vectors e 1 = (1, 0 , 0), e 2 = (0, 1 , 0), e 3 = (0, 0 , 1).
The coordinate system is in turn determined completely by these three vectors, which are called the basis of
vectors determined by the coordinate system. If v is any vector then it may be expressed as a linear combination
c 1 e 1 + c 2 e 2 + c 3 e 3. The coordinates of the head of v are the coefficients ci.
At any rate, we get a matrix from a linear transformation T^ by setting the entries in its^ i-th column to be the
coordinates of the point T ei.
Suppose we choose two different coordinate systems, with special vectors e• and also f•. We get from the first a
matrix A associated to T , and from the second a matrix B. What is the relationship between the matrices A and
B? We shall not see here a proof, but the result is relatively simple. Let F be the 3 × 3 matrix whose columns are
the coordinates of the vectors f• in terms of the vectors e•. Then
The important consequence of this for us now is that the determinant of a linear transformation, which is defined
in terms of a matrix associated to it, is independent of the coordinate system which gives rise to the matrix. That
is because
A = F BF
− 1 , det(A) = det(F BF
− 1 ) = det(F ) det(B) det(F )
− 1 = det(B).
For our immediate purposes we apply this in this fashion: suppose T v = −v. We choose a set of basis vectors
with the first equal to v and the others in the plane perpendicular to v. Since T preserves this plane, we can
associate to it a 2 × 2 matrix A. The 3D matrix of T is then
0 a b
0 c d
a b
c d
The determinant of this matrix is then equal to − det(A). Since T preserves orientation, this must be positive,
which implies that det(A) < 0 , and T acts upon the perpendicular plane so as to reverse orientation.