Math Fundamentals: 1. Conventions and Definitions 2. Matrices 3. Fundamentals of Rigid Transforms
Math Fundamentals: 1. Conventions and Definitions 2. Matrices 3. Fundamentals of Rigid Transforms
Math Fundamentals: 1. Conventions and Definitions 2. Matrices 3. Fundamentals of Rigid Transforms
Math Fundamentals
Part 1
1. Conventions and Definitions
2. Matrices
3. Fundamentals of Rigid Transforms
Outline
• 2.1 Conventions and Definitions
• 2.2 Matrices
• 2.3 Fundamentals of Rigid Transforms
– 2.3.1 Definitions
– 2.3.2 Why Homogeneous Transforms
– 2.3.3 Semantics and Interpretations
• Summary
2.3.1 Affine Transformation
• Rotation
𝑗𝑎
𝑝
𝑟
𝑖𝑎
𝑟𝑐𝑜𝑠(𝜃)
𝑟𝑝𝑎 =
𝑟𝑠𝑖𝑛(𝜃)
2.3.1 Affine Transformation
• Rotation
𝑗𝑎
𝑗𝑏 𝑝
𝑟𝑝𝑏 𝑖𝑏
𝑖𝑎
1 𝑟𝑐𝑜𝑠(𝜃)
𝑟𝑝𝑏 = 𝑟𝑝𝑎 =
0 𝑟𝑠𝑖𝑛(𝜃)
2.3.1 Affine Transformation
• Rotation
𝑦𝑎 𝑖𝑏 . 𝑖𝑎 𝑗𝑏 . 𝑖𝑎
𝑅𝑏𝑎 =
𝑖𝑏 . 𝑗𝑎 𝑗𝑏 . 𝑗𝑎
𝑦𝑏 𝑝
𝑟𝑝𝑏 𝑥𝑏 cos(𝜃) −sin(𝜃)
𝑅𝑏𝑎 =
sin(𝜃) cos(𝜃)
𝑥𝑎
𝑟𝑝𝑎 =𝑅𝑏𝑎 𝑟𝑝𝑏
𝑗𝑏
𝑝
𝑟𝑝𝑏
𝑖𝑏
𝑟𝑝𝑎 =𝑟𝑝𝑏 + 𝑜𝑏𝑎
𝑗𝑎
𝑖𝑎
2.3.1 Affine Transformation
• Rotation + Translation
𝑗𝑏 𝑝
𝑟𝑝𝑏 𝑖𝑏
𝑖𝑎
2.3.1 Affine Transformation
• Most general linear transformation
+ nothing
• But:
– Can be used to effect rotation.
– Preserves linearity and distance (hence, areas and
angles).
Outline
• 2.1 Conventions and Definitions
• 2.2 Matrices
• 2.3 Fundamentals of Rigid Transforms
– 2.3.1 Definitions
– 2.3.2 Why Homogeneous Transforms
– 2.3.3 Semantics and Interpretations
• Summary
Homogeneous Coordinates
Trick: Move to 4D
Outline
• 2.1 Conventions and Definitions
• 2.2 Matrices
• 2.3 Fundamentals of Rigid Transforms
– 2.3.1 Definitions
– 2.3.2 Why Homogeneous Transforms
– 2.3.3 Semantics and Interpretations
• Summary
Trig Function Shorthand
• sin() s
• cos( c
• tan( t
• sin(cos) sc s1c2
• sin( s s12
Operators
• Mapping:
– Point Point ’ (both expressed in same coordinates)
Operators
x
1 0 0 u
Tra n s u v w = 0 1 0 v
p’ 0 0 1 w
p 0 0 0 1
z
• Note capital T in Trans().
y
Operators
x
1 0 0 0
R otx = 0 c –s 0
p’ 0 s c 0
p
0 0 0 1
z
• Note capital R in Rotx().
y
Operators
y c 0 s 0
0 1 0 0
Roty =
p’ –s 0 c 0
p
0 0 0 1
x
• Note capital R in Roty().
Operators
z
c – s 0 0
R o t z = s c 0 0
p’ 0 0 1 0
p 0 0 0 1
y
• Note capital R in Rotz().
x
Compound Operators
• Mapping:
– Point Point′ (both expressed in same coordinates)
• Compound mapping:
– Point′ Point′′ (still in same coordinates)
T
o'' = Ro tx 2 Tr ans 0 v 0 o
o'' = 0 0 v 1
z 10 0 0 1000 0 10 0 0 0 0
o'' = 0 0 –1 0 010v 0 = 0 0 –1 0 v = 0
01 0 0 0010 0 01 0 0 0 v
00 0 1 0001 1 00 0 1 1 1
y Result
v o' = 0 v 0 1 T
x
Example: Operating on a Frame
• Each resulting column of this result is the transformation
of the corresponding column in the original identity
matrix …
T I ' = R o t x 2 T ra ns 0 v 0 I
0 –1 0
0 z T
0 0 1 0
j’
k’ 1 0 0 0 1 0 0 0 1 0 0 0 1 0 0 0
I' = 0 0 –1 0 0 1 0 v 0 1 0 0 = 0 0 –1 0
i’ 0 1 0 0 0 0 1 0 0 0 1 0 0 1 0 v
0 0 0 1 0 0 0 1 0 0 0 1 0 0 0 1
y
x
Conversion of Basis
• Operator: the result is the movement of frame a’s unit
vectors (“basis”) to those of frame b.
• So the result must express the unit vectors of frame b in
coordinates of frame a.
ka 1 0 0 0
a a
I b = R otx 2 Tra ns 0 v 0I a = 0 0 –1 0
jb 0 1 0 v
kb 0 0 0 1
ib
ja • We have converted coordinates of
the basis b from frame b to frame a.
ia
Converting Frames of Reference
• Converting frames is about expressing the same physical
point with respect to a new origin and set of unit vectors.
zb
za
yb
ya
xb b
xa
a
rp
rp
p
Operator/Transform Duality
• The homogeneous transform that moves frame ‘a’
into coincidence with frame ‘b’ (operator) also
converts the coordinates (transform) of points in
the opposite direction - from frame ‘b’ to frame
‘a’.
• Because, of the opposite direction semantics, its
sometimes more convenient to use the matrices
which convert coordinates from frame ‘a’ to frame
‘b’.
– These are just the matrix inverses.
Compound Transforms
• Mapping:
– Point a Point b (same physical point)
– Result expressed in frame b
• Compound mapping
– Point b Point c (same physical point)
– Result now expressed in frame c.
• Transforms have moving axis compounding
semantics.
– Result is not expressed in “the original frame” but
rather in the last one.
Inverse of a HT
-1
R p RT -R Tp
=
0 0 0 1 0 0 0 1
Outline
• 2.1 Conventions and Definitions
• 2.2 Matrices
• 2.3 Fundamentals of Rigid Transforms
– 2.3.1 Definitions
– 2.3.2 Why Homogeneous Transforms
– 2.3.3 Semantics and Interpretations
• Summary