Professional Documents
Culture Documents
03 Homogeneous Transformation A v1 Non Video
03 Homogeneous Transformation A v1 Non Video
transformations
^
YA
YˆB P
tY X̂ B
A
PBORG
O
tX X̂ A
Position Description
Once a coordinate system is established, we can locate any
point in the space with a 3 x 1 position vector.
Ẑ A
PX
A
P
A
P PY
PZ
YˆA
X̂ A
Coordinate System A
1-2
Orientation Description
Attach Frame B
• To describe the orientation of a
(Coordinate System
Ẑ B body in space, we will attach a
B)
Ẑ A coordinate system (frame B) to
the body and then give a
description of this coordinate
X̂ B A
P YˆB
system relative to the reference
o YˆA system (frame A).
At least three independent values (angles) are
Coordinate System A needed to describe the orientation of frame B
with respect to frame A.
X̂ A
Ẑ B
• The description of a frame can Ẑ A
be thought of as a position
vector and a rotation matrix. X̂ B
A
PBORG YˆB
Position + orientation
{B} { R, PBORG }
A
B
A
YˆA
X̂ A 1-4
2D Rotation matrix Rotation around the Z-Axis
^
YA
Given: The location of point
YˆB
B
A
PY P P in coordinate frame B: B PX PY
X̂ B A A
B Determine: PX PY
PX
B
PY
O A
PX X̂ A
A
PX OP cos( ) OP cos cos sin sin B PX cos B PY sin
A
PY OP sin( ) OP sin cos sin cos B PX sin B PY cos
A
PX cos sin 0 B PX
PX cos sin PX A
A B
A
A B ; P PY sin cos 0 B PY BA R B P
PY sin cos PY 0 0 0 1 0
1-5
^
2D Rotation matrix Rotation around the Z-Axis
YA
One way to describe the rotation
YˆB P
A
PY matrix, BA R
X̂ B , is to write the unit vectors of
B
PX frame {B} in terms of the
B
PY coordinate frame {A}.
O A
PX X̂ A
OP cos( ) ^ B ^ ^ ^
B ^ ^ ^ ^
PX
A
OP X ( P X B
P Y ) X P X X B
P Y X
A A
X B Y B A
X B A Y B A
PY OP sin( ) OP Y ( B P X B P Y ) Y B P X Y B P Y Y
^ ^ ^ ^ ^ ^ ^ ^
A X B Y B A X B A Y B A
^ ^ ^ ^
B
X X Y X P ^ ^
B
P cos sin B
PX
^ ^B A B A
^ B
X
B
A
X A
Y B B
X
B
^
P Y
P sin cos PY
X B YA YB YA
1-6
3D-Rotation matrix
Orientation Description
Hence, each component of a matrix
rotation can be written as the dot product
of a pair of unit vectors: Ẑ A
A Ẑ B
P
A
B R A Xˆ B YˆB
A A
Zˆ B
X̂ B
r11 r12 r13 YˆB
r31 Xˆ B Zˆ A
r21 r22 r23 r21 Xˆ B YˆA
r31 r32 r33 YˆA
r11 Xˆ B Xˆ A
Xˆ B Xˆ A YˆB Xˆ A Zˆ B Xˆ A X̂
A
A
R Xˆ Yˆ Yˆ Yˆ Zˆ B YˆA
B B A B A
ˆ ˆ ˆ ˆ ˆ ˆ
X B Z A YB Z A Z B Z A
1-7
3D-Rotation matrix
Directional Cosines
A
B R A Xˆ B A
YˆB A
Zˆ B Directional Cosines
Xˆ B Xˆ A YˆB Xˆ A Zˆ B Xˆ A
B
X̂
T
A
ˆ ˆ YˆB YˆA Zˆ B YˆA
B R X B YA
A
ˆ ˆ ˆ Zˆ ˆ ˆ
B A
X Z Y B A Z B Z A
B Xˆ AT
B T B T
A
R Yˆ Xˆ B
YˆA B ˆ
ZA AR
B T
B A A
Bˆ T
Z A
1-8
Rotation matrix
r11 r12 r13
A
R BA RT r r r r r r
21 22 23 1 2 3
B A
B R
A
B R BA R I BA R BA R 1 r31 r32 r33
r1 r2 r3 1
B
A RT B
A R 1
r1 r2 r1 r3 r2 r3 0
• For matrix M,
A
B R 1
1-9
Basic Rotation matrix
Rotation around the X-Axis by an angle
1 0 0 These basic rotation matrices
cos -sin
clearly satisfy the properties:
B R X , 0
A
B R K ,0 I 3 ;
A
1-11
Combine Rotation and Translation
^
YA YˆB P
tY A
PBORG
X̂ B
PBORG t X 0
A T
tY
O
tX X̂ A
A
P R Z , P PBORG
A
B
B A
A PX cos sin 0 B PX t X
A B
A
P PY sin cos 0 PY tY
0 0 0 1 0 0
1-12
Combine Rotation and Translation
^
It consists 2 operations, a multiplication and a addition
P BA R Z , B P A PBORG
YA A
YˆB P
tY X̂ B
cos sin 0 B PX t X
P sin 0 B PY tY
A
PBORG
A
cos
O
0 0 1 0 0
tX X̂ A
A PX cos sin 0 t X B PX
A B
PY sin cos 0 tY PY A B
A
P BT P
0 0 0 1 0 0
Homogeneous coordinates are a way
of representing N-dimensional
coordinates with N+1 numbers. To
X̂ A A Px A
PBORG _ x B Px
A A A B
Py B R PBORG _ y Py
A Pz A
PBORG _ z B Pz
1 0 0 0 1 1
A
B T 1-14
Example
This figure shows a frame {B},
which is rotated relative to
frame {A} about axis XA by 90
degrees, translated 3 units in
YA, and translated 1 units in ZA
Find AP, where BP = [0 1 1]T
1 0 0 0 0 0
BA R 0 0 1 3 1 2
A
PBorg B
P T P P
A A B
1 1 2
B
0 1 0 1 0
0 0 0 1 1 1
1-15
Homogeneous Transformation
PBORG t X tZ
A T
Translation tY
Ẑ B
Zˆ A A
A PX B PX t X 1 0 0 t X B PX
A B
B
PBORG 0 tY B PY
P
PY PY tY 0 1
A
P A
X̂ B A
P PZ B PZ tZ 0 1 tZ B PZ
YˆB
0
1 1 1 0 0 0 1 1
t X B PX
YˆA I t B
Y PY
A
P
Xˆ A tZ B PZ
0 0 0 1
1
A P A B P
BT I A
PBORG
1 1
BT
A
0 0 0 1 1-16
Homogeneous Transformation
B
Rotation Px
B
P Py Px X
ˆ PY ˆ ˆ
y B Pz Z B
Zˆ A
B
Ẑ B B
P Pz
A
P (P A X ˆ P AY ˆ P AZ ˆ )
YˆB
x B y B z B
B
Px
A ˆ
P [ AX B
A ˆ
Y B Z B ] Py
A ˆ
Pz
YˆA A
P BA R B P
Xˆ A
X̂ B A
R 0
P A P BT
A B A B
BT
1 1 0 0 0 1
1-17