Lecture 7.
Representing
Rotation
Kinematic
representation:
goals, overview
Lecture 7.
Representing Rotation
Planar
displacements
Spatial rotations
Preview
Axis-angle
Rodrigues’s formula
Rotation matrices
Matthew T. Mason
Mechanics of Manipulation
Fall 2013
Euler angles
Today’s outline
Kinematic representation: goals, overview
Lecture 7.
Representing
Rotation
Kinematic
representation:
goals, overview
Planar
displacements
Spatial rotations
Planar displacements
Preview
Axis-angle
Rodrigues’s formula
Rotation matrices
Euler angles
Spatial rotations
Preview
Axis-angle
Rodrigues’s formula
Rotation matrices
Euler angles
Readings, etc.
Lecture 7.
Representing
Rotation
Kinematic
representation:
goals, overview
Planar
displacements
I
We are starting chapter 3 of the text
I
Lots of stuff online on representing rotations
I
Murray, Li, and Sastry for matrix exponential
I
Roth, Crenshaw, Ohwovoriole, Salamin, all cited in
text
Spatial rotations
Preview
Axis-angle
Rodrigues’s formula
Rotation matrices
Euler angles
Analytic geometry
So far, Euclidean geometry. Why?
I
Insight
I
Visualization
I
Economy of expression
Lecture 7.
Representing
Rotation
Kinematic
representation:
goals, overview
Planar
displacements
Spatial rotations
Preview
Axis-angle
Rodrigues’s formula
Rotation matrices
Now Cartesian, analytic geometry. Why?
I
Beyond 2D, beyond 3D. We need to work with high
dimensional configuration spaces!
I
For implementation
I
For additional insight
The best of all possible worlds: use both. Understand
geometrical or physical meaning for all terms.
Euler angles
Agenda for kinematic representation
Lecture 7.
Representing
Rotation
Kinematic
representation:
goals, overview
Planar
displacements
Following the kinematic agenda:
Spatial rotations
Preview
Axis-angle
I
Planar displacements
Rodrigues’s formula
I
Spherical displacements
Euler angles
I
Spatial displacements
I
Constraints
Rotation matrices
Representing planar displacements
Obvious idea 1
I
Displacement is rotation or translation
I
Choose a coordinate frame (O, x̂, ŷ )
I
For rotation, (center, angle), i.e. ((x, y ), θ)
I
For translation, (∆x , ∆y )
I
Ugly
Obvious idea 2
I
Given O, displacement is rotation about O;
translation
I
Choose a coordinate frame (O, x̂, ŷ )
I
(∆x , ∆y , θ)
Lecture 7.
Representing
Rotation
Kinematic
representation:
goals, overview
Planar
displacements
Spatial rotations
Preview
Axis-angle
Rodrigues’s formula
Rotation matrices
Euler angles
What are representations for?
I
I
Obvious ideas didn’t yield homogeneous coordinate
transform matrices?
We didn’t consider all the uses of representations!
Lecture 7.
Representing
Rotation
Kinematic
representation:
goals, overview
Planar
displacements
Spatial rotations
Preview
Axis-angle
Uses of representations
Rodrigues’s formula
Rotation matrices
Euler angles
I
Communicate with humans and computers
I
Operate on points, lines and stuff
I
Compose
I
Sample, interpolate, average, smooth
I
Differentiate, integrate
Operating on stuff
Lecture 7.
Representing
Rotation
Kinematic
representation:
goals, overview
I
I
(∆x , ∆y , θ) is good for communication. How would
you operate on points? Composition? Averaging?
Sampling?
To operate on points:
I
I
I
I
I
Represent points by Cartesian coordinates: (x, y )
Rotate using rotation matrix
Translate using component-wise addition
Tidy it up using homogeneous coordinates
We will revisit later
Planar
displacements
Spatial rotations
Preview
Axis-angle
Rodrigues’s formula
Rotation matrices
Euler angles
Why representing rotations is hard.
Lecture 7.
Representing
Rotation
Kinematic
representation:
goals, overview
I
Rotations do not commute. Vectors are out.
I
For computation we like to represent things with real
numbers, so our representations all live in Rn .
Planar
displacements
Spatial rotations
Preview
Axis-angle
Rodrigues’s formula
I
I
Even though SO(3) is a three-dimensional space, it
has the topology of projective three space P3 , which
cannot be smoothly mapped to R3 .
And, we have lots of different applications, with
different requirements: communication, operating on
things, composition, interpolation, etc.
Rotation matrices
Euler angles
Choices
Lecture 7.
Representing
Rotation
Kinematic
representation:
goals, overview
I
Axis-angle
I
I
I
I
Good for operating on stuff, composition, analytical
insight
Unit quaternions (aka Euler parameters)
I
I
Good for communication, geometrical insight
Rotation matrices
Good for composition, analytical insight, sampling
Euler angles
I
Good for communication, geometrical insight
Planar
displacements
Spatial rotations
Preview
Axis-angle
Rodrigues’s formula
Rotation matrices
Euler angles
Lecture 7.
Representing
Rotation
Axis-angle
Euler’s theorem: every spatial rotation
has a rotation axis.
I
n
Let O, n̂, θ, be . . .
Let rot(n̂, θ) be the corresponding
rotation.
I Many to one:
I
I
I
I
I
I
I
rot(−n̂, −θ) = rot(n̂, θ)
rot(n̂, θ + 2k π) = rot(n̂, θ), for any integer k .
So, restrict θ to [0, π]. But not smooth at the edges.
When θ = 0, the rotation axis is indeterminate, giving
an infinity-to-one mapping.
Again you can fix by adopting a convention for n̂, but
result is not smooth.
(Or, what about using the product, θn̂? Later.)
Kinematic
representation:
goals, overview
Planar
displacements
Spatial rotations
Preview
Axis-angle
Rodrigues’s formula
Rotation matrices
Euler angles
What do we want from axis-angle?
Lecture 7.
Representing
Rotation
Kinematic
representation:
goals, overview
I
Operate on points
I
I
Compose rotations, average, interpolate, sampling,
. . .?
I
I
Rodrigues’s formula
Not using axis-angle
Convert to other representations? There aren’t any
yet. But, later we will use axis-angle big time. It’s
very close to quaternions.
Planar
displacements
Spatial rotations
Preview
Axis-angle
Rodrigues’s formula
Rotation matrices
Euler angles
Lecture 7.
Representing
Rotation
Rodrigues’s formula
Others derive Rodrigues’s formula using rotation
matrices: ugly and messy. The geometrical approach is
clean and insightful.
I
Kinematic
representation:
goals, overview
Planar
displacements
Given point x, decompose into
components parallel and
perpendicular to the rotation axis
Spatial rotations
Preview
Axis-angle
Rodrigues’s formula
Rotation matrices
x = n̂(n̂ · x) − n̂ × (n̂ × x)
n
n
x
Euler angles
n
n
I
Only x⊥ is affected by the rotation,
yielding Rodrigues’s formula:
nn x
0
x = n̂(n̂·x)+sin θ (n̂×x)−cos θ n̂×(n̂×x)
I
A common variation:
x0 = x+(sin θ) n̂×x+(1−cos θ) n̂×(n̂×x)
O
x
x
x
Rotation matrices
I
I
I
Choose O on rotation axis. Choose frame
(û1 , û2 , û3 ).
Let (û01 , û02 , û03 ) be the image of that frame.
Write the û0i vectors in ûi coordinates, and collect
them in a matrix:
a11
û1 · û01
û01 = a21 = û2 · û01
a31
û3 · û01
a12
û1 · û02
û02 = a22 = û2 · û02
a32
û3 · û02
a13
û1 · û03
û03 = a23 = û2 · û03
a33
û3 · û03
A = aij = û01 |û02 |û03
Lecture 7.
Representing
Rotation
Kinematic
representation:
goals, overview
Planar
displacements
Spatial rotations
Preview
Axis-angle
Rodrigues’s formula
Rotation matrices
Euler angles
So many numbers!
I
A rotation matrix has nine numbers,
I
but spatial rotations have only three degrees of
freedom,
I
leaving six excess numbers . . .
I
There are six constraints that hold among the nine
numbers.
|û01 | = |û02 | = |û03 | = 1
û03 = û01 × û02
I
i.e. the û0i are unit vectors forming a right-handed
coordinate system.
I
Such matrices are called orthonormal or rotation
matrices.
Lecture 7.
Representing
Rotation
Kinematic
representation:
goals, overview
Planar
displacements
Spatial rotations
Preview
Axis-angle
Rodrigues’s formula
Rotation matrices
Euler angles
Lecture 7.
Representing
Rotation
Rotating a point
I
I
Let (x1 , x2 , x3 ) be coordinates of x in frame
(û1 , û2 , û3 ).
x0
Then is given by the same coordinates taken in
the (û01 , û02 , û03 ) frame:
Kinematic
representation:
goals, overview
Planar
displacements
Spatial rotations
Preview
Axis-angle
Rodrigues’s formula
0
x
=x1 û01
+
x2 û02
+
x3 û03
=x1 Aû1 + x2 Aû2 + x3 Aû3
=A(x1 û1 + x2 û2 + x3 û3 )
=Ax
I
So rotating a point is implemented by ordinary matrix
multiplication.
Rotation matrices
Euler angles
Sub- and superscript notation for rotating a
point
Lecture 7.
Representing
Rotation
Kinematic
representation:
goals, overview
I
Let A and B be coordinate frames.
I
Let A x be coordinates in frame A.
I
BR
A
Let
be the rotation matrix that rotates frame B to
frame A.
I
Then (see previous slide) BAR represents the rotation
of the point x:
B 0
x = BAR B x
I
Note presuperscripts all match. Both points, and
xform, must be written in same coordinate frame.
Planar
displacements
Spatial rotations
Preview
Axis-angle
Rodrigues’s formula
Rotation matrices
Euler angles
Lecture 7.
Representing
Rotation
Coordinate transform
Kinematic
representation:
goals, overview
There is another use for BAR:
I Ax
and B x represent the same point, in frames A and
B resp.
I
Planar
displacements
Spatial rotations
Preview
Axis-angle
To transform from A to B:
Rodrigues’s formula
Rotation matrices
B
I
x=
B A
AR x
For coord xform, matrix subscript and vector
superscript “cancel”.
Rotation from B to A is the same as coordinate transform
from A to B.
Euler angles
Lecture 7.
Representing
Rotation
Example rotation matrix
B
AR
Bx
=
A
By
A
Bz
A
1 0 0
= 0 0 −1
0 1 0
Kinematic
representation:
goals, overview
Planar
displacements
Spatial rotations
Preview
Axis-angle
Rodrigues’s formula
Rotation matrices
Euler angles
How to remember what BAR does? Pick a
coordinate axis and see. The x axis isn’t
very interesting, so try y :
1 0 0
0
0
0 0 −1 1 = 0
0 1 0
0
1
Nice things about rotation matrices
Lecture 7.
Representing
Rotation
Kinematic
representation:
goals, overview
I
Composition of rotations: {R1 ; R2 } = R2 R1 .
({x; y } means do x then do y .)
Planar
displacements
Spatial rotations
Preview
Axis-angle
I
I
Inverse of rotation matrix is its transpose
BR −1 = AR = BR T .
B
A
A
Coordinate xform of a rotation matrix:
B
R = BAR A R ABR
Rodrigues’s formula
Rotation matrices
Euler angles
Converting rot(n̂, θ) to R
I
Ugly way: define frame with ẑ aligned with n̂, use
coordinate xform of previous slide.
I
Keen way: Rodrigues’s formula!
Lecture 7.
Representing
Rotation
Kinematic
representation:
goals, overview
Planar
displacements
Spatial rotations
Preview
0
x = x + (sin θ) n̂ × x + (1 − cos θ) n̂ × (n̂ × x)
Axis-angle
Rodrigues’s formula
Rotation matrices
I
Define “cross product matrix” N:
0
−n3 n2
0
−n1
N = n3
−n2 n1
0
so that
Nx = n̂ × x
Euler angles
Lecture 7.
Representing
Rotation
. . . using Rodrigues’s formula . . .
I
Substituting the cross product matrix N into
Rodrigues’s formula:
Kinematic
representation:
goals, overview
x0 = x + (sin θ)Nx + (1 − cos θ)N 2 x
Planar
displacements
Spatial rotations
I
Preview
Factoring out x
Axis-angle
Rodrigues’s formula
Rotation matrices
R = I + (sin θ)N + (1 − cos θ)N 2
I
Euler angles
That’s it! Rodrigues’s formula in matrix form. If you
want to you could expand it:
n12 + (1 − n12 )cθ
n1 n2 (1 − cθ) + n3 sθ
n1 n3 (1 − cθ) − n2 sθ
n1 n2 (1 − cθ) − n3 sθ
n22 + (1 − n22 )cθ
n2 n3 (1 − cθ) + n1 sθ
where cθ = cos θ and sθ = sin θ. Ugly.
n1 n3 (1 − cθ) + n2 sθ
n2 n3 (1 − cθ) − n1 sθ
n32 + (1 − n32 )cθ
Rodrigues’s formula for differential rotations
Consider Rodrigues’s formula for a differential rotation
rot(n̂, dθ).
x0 =(I + sin dθN + (1 − cos dθ)N 2 )x
Lecture 7.
Representing
Rotation
Kinematic
representation:
goals, overview
Planar
displacements
Spatial rotations
=(I + dθN)x
Preview
Axis-angle
Rodrigues’s formula
Rotation matrices
so
Euler angles
dx =Nx dθ
=n̂ × x dθ
It follows easily that differential rotations are vectors: you
can scale them and add them up. We adopt the
convention of representing angular velocity by the unit
vector n̂ times the angular velocity.
Converting from R to rot(n̂, θ) . . .
Lecture 7.
Representing
Rotation
Kinematic
representation:
goals, overview
Planar
displacements
Spatial rotations
Preview
I
Problem: n̂ isn’t defined for θ = 0.
Axis-angle
I
We will do it indirectly. Convert R to a unit quaternion
(next lecture), then to axis-angle.
Rotation matrices
Rodrigues’s formula
Euler angles
Lecture 7.
Representing
Rotation
Euler angles
I
Three numbers to describe spatial
rotations. ZYZ convention:
Kinematic
representation:
goals, overview
(α, β, γ) 7→ rot(γ, ẑ00 ) rot(β, ŷ0 ) rot(α, ẑ)
z
Planar
displacements
Spatial rotations
I
Can we represent an arbitrary
rotation?
Rotate α about ẑ until
ŷ0 ⊥ ẑ000 ;
Rotate β about ŷ0 until
ẑ00 k ẑ000 ;
Rotate γ about ẑ00 until
ŷ00 = ŷ000 .
I
Note two choices for ŷ0 . . .
I
. . . except sometimes infinite
choices.
Preview
z
Axis-angle
Rodrigues’s formula
Rotation matrices
Euler angles
x
y
x
Converting from Euler angles to rotation
matrices
Lecture 7.
Representing
Rotation
Kinematic
representation:
goals, overview
notation
Planar
displacements
I
Define frames {0}, {1}, {2}, {3} so that
I
rot(α, ẑ) maps {0} to {1}, etc.,
Spatial rotations
Preview
Axis-angle
Rodrigues’s formula
iR
j
I
As before
is the rotation matrix rotating frame {i}
to frame {j}, written in frame {i} coordinates.
I
Let k(ij R) be the same matrix, written in frame {k }
coordinates.
I
Then the correct sequence, written in a common
coordinate frame, would be
0
3R
= 0 (23 R) 0 (12R) 0 (01 R)
Rotation matrices
Euler angles
Moving frame versus fixed frame
Switch to moving frame
I
Use the coordinate transform of a matrix formula:
Lecture 7.
Representing
Rotation
Kinematic
representation:
goals, overview
Planar
displacements
Spatial rotations
0
3R
=
=
=
0 2
(3 R) 0 (12 R) 01 R
(02 R 23 R 20 R) (01 R 12 R 10 R) 01 R
0 1 2
1R 2R 3R
I
Wow! You can switch between moving frame and
fixed frame, if you also switch the order!
I
You could also have derived the above, just by
interpreting 03 R as a coordinate transform.
Preview
Axis-angle
Rodrigues’s formula
Rotation matrices
Euler angles
Lecture 7.
Representing
Rotation
From (α, β, γ) to R
Kinematic
representation:
goals, overview
Planar
displacements
0
3R
= 01 R 12 R 23 R
cα −sα 0
= sα cα 0
0
0
1
cα cβ cγ − sα sγ
sα cβ cγ + cα sγ
=
−sβ cγ
Spatial rotations
Preview
cβ 0 sβ
cγ −sγ 0
0
1 0 sγ cγ 0
−sβ 0 cβ
0
0
1
−cα cβ sγ − sα cγ cα sβ
−sα cβ sγ + cα cγ sα sβ
sβ sγ
cβ
Axis-angle
Rodrigues’s formula
Rotation matrices
Euler angles
From R to (α, β, γ) the ugly way
I
Case 1: r33 = 1, β = 0. α − γ is indeterminate.
cos(α + γ) − sin(α + γ) 0
R = sin(α + γ) cos(α + γ) 0
0
0
1
Lecture 7.
Representing
Rotation
Kinematic
representation:
goals, overview
Planar
displacements
Spatial rotations
Preview
Axis-angle
I
Case 2: r33 = −1, β = πor − π. α + γ is
indeterminate.
− cos(α − γ) − sin(α − γ) 0
0
R = − sin(α − γ) cos(α − γ)
0
0
−1
I
For generic case: solve 3rd column for β. (Sign is
free choice.) Solve third column for α and third row
for γ.
I
. . . but there are numerical issues . . .
Rodrigues’s formula
Rotation matrices
Euler angles
From R to (α, β, γ) the clean way
I
Lecture 7.
Representing
Rotation
Let
σ =α+γ
Kinematic
representation:
goals, overview
δ =α−γ
Planar
displacements
Spatial rotations
I
Then
Preview
Axis-angle
Rodrigues’s formula
r22 + r11 = cos σ(1 + cos β)
r22 − r11 = cos δ(1 − cos β)
r21 + r12 = sin δ(1 − cos β)
r21 − r12 = sin σ(1 + cos β)
(No special cases for cos β = ±1?)
I
Solve for σ and δ, then for α and γ, then finally
β = tan−1 (r13 cos α + r23 sin α, r33 )
Rotation matrices
Euler angles
But what about sin β = 0?
Lecture 7.
Representing
Rotation
Kinematic
representation:
goals, overview
Planar
displacements
I
How can this method work without explicitly
addressing the singularity?
I
When β = 0, σ is determined and δ is not. When
β = π, δ is determined and σ is not.
I
If your tan−1 handles (0, 0), you can just let it go!
Spatial rotations
Preview
Axis-angle
Rodrigues’s formula
Rotation matrices
Euler angles
© Copyright 2026 Paperzz