Intuition for Coordinate Set Transformations

Intuition for Coordinate Set Transformations
December 5, 2016
Going back to basics
2D Case
In order to start getting the intuition for applying rotation transformations, lets
go back to the simple 2D case, shown in gure 1.
We have two coordinate sets (0,1). If we take a vector in coordinate space
0, for example 0 V = [1, 0]T and we rotate it by positive 45 degrees counterh √ √ iT
clockwise, we get a vector 0 U = 22 , 22 that is aligned with the direction
of x1 , but the coordinates of the vector are still in coordinate set 0. This same
vector can be written as 1 U = [1, 0]T since when looking at this vector from
the perspective of coordinate set 1 (tilt your head 45 degrees to the left), it just
has an X component. Both 0 U, 1 U refer to the same vector, but in two dierent
coordinate sets.
The rotation matrix used for this purpose is a simple positive 45 degree
rotation of a vector:
R=
c −s
s c
√
c = cos (45) =
2
= sin(45) = s
2
(1)
Transformation between sets
Looking at these values in another way, 0 U is how 1 U is seen in coordinate space
0. As we introduced in our notation, when we want to mark a rotation that
calculates how something in coordinate set 1 looks in coordinate set 0, we use:
0
U =01 R ·1 U
(2)
This means that 01 R is a transformation from coordinate set 1 to coordinate
set 0.
Now we get to the crux of the confusion. If we go back to how we created our
rotation matrix, we see that we rotated a vector in set 0 by positive 45 degrees,
and we got a transformation from set 1 to set 0. Our intuitive approach to
calculating a transformation from set 1 to set 0 would have us ask what is the
rotation of the axes of set 1 so that they align with the axes of set 0.
1
Figure 1: Simple 2D case
2
In order to reconcile this seeming conict, we can choose one of the following,
which are mathematically identical:
Rotate a vector in the opposite direction (not very helpful with intuition)
Use a negative angle (Also can disrupt our thinking processes)
Use an alternative rotation matrix, which is the approach that appears
in the lectures.
So, although a regular vector rotation matrix looks like:
Rvectors =
cos (θ) −sin (θ)
sin (θ) cos (θ)
For the purpose of transforming between coordinate sets, we can use the
matrix:
Rsets =
cos (θ) sin (θ)
−sin (θ) cos (θ)
As mentioned above, this is identical mathematically to using the transpose,
or negative angle, or opposite direction. But if we ignore that and simply use
this matrix for the purpose of transforming between coordinate sets we'll be
ne.
This notion extends naturally to 3D rotations. Simply switch the minus sign
before the sin (θ) in the matrix.
3
Solving a sample question with explanation
Here is a solution for part of a question, that shows the transformation between
2 coordinate sets involving non-trivial rotation.
Calculating 10 T means that we want the transformation that allows to calculate how vectors in set 0 appear in set 1.
Since the rotation has two parts, and the translation is not trivial when seen
from coordinate set 1, we can break this transformation into two parts. Lets
dene a coordinate set 3, that has an origin where the origin of set 1 is, and has
the following axes:
Now we can break up the problem into 2 smaller ones.
1
0T
= 13 T 30 T
4
We will calculate 30 T rst. Since we chose the axes of set 3 wisely, the rotation
of the axes of set 0 is simply -90 degrees around X, so that the Z axis goes into
the page and the Y axis points down (X does not change when rotating around
X). This rotation is given by:

1
3
 0
0R =
0
 
0
1 0
sin(−90)  =  0 0
cos(−90)
0 1
0
cos(−90)
−sin(−90)

0
−1 
0
For 3 P0 ORG we ask where the origin of set 0 is when viewed in set 3. This
is simply 2a in the direction of Y, so:

3
P0 ORG

0
=  2a 
0
And so, we can now compose the transformation:

3
0T
3
0R
=
3
000
P0 ORG
1
1
 0

 0
0
0
0
1
0
0
−1
0
0

0
2a 

0 
1
The second part is to calculate the transformation 13 T . Again, because we
chose the position of the origin for this set wisely, there is no translation, and
the rotation is a simple one axis rotation. In this case, it is a positive 45 degree
rotation around the Z axis.
  √2
0
 2√
0 = − 2
2
1
0

cos(45) sin(45)
1

−sin(45)
cos(45)
R
=
3
0
0
√
2
√2
2
2
0

0

0 
1
So the transformation between 3 and 1 is simply:
√

1
3T
=
1
3R
0
0
1



2
2√
− 22
0
0
√
2
√2
2
2
0
0

0 0
0 0 

1 0 
0 1
And now all we need is to multiply two matrices:
√

1
0T

= 13 T 30 T = 

2
2√
− 22
√
2
√2
2
2
0
0
0
0

0 0
1 0
 0 0
0 0 

1 0  0 1
0 0
0 1
5
0
−1
0
0
  √2
0
2√

2
2a 
= − 2


0
0
1
0
√
0 − √22
0 − 22
1
0
0
0
√
a 2
√
a 2
0
1



