Download as ppt, pdf, or txt
Download as ppt, pdf, or txt
You are on page 1of 8

HOMOGENEOUS REPRESENTATION

Putting it all into a Matrix

V X   Px  cosθ  sinθ  V N  What we found by doing a


V XY
  Y       
cosθ  V O 
translation and a rotation
V  Py   sinθ

V X   Px  cosθ  sinθ 0  V N  Padding with 0’s and 1’s


   
 V Y   Py    sinθ cosθ 0 V O 
 1   1   0 0 1  1 
 

V X  cosθ  sinθ Px   V N 
   
 V Y    sinθ cosθ Py  V O  Simplifying into a matrix form
 1   0 0 1   1 
 
cosθ  sinθ Px 
H   sinθ cosθ Py  Homogenous Matrix for a Translation in
XY plane, followed by a Rotation around
 0 0 1  the z-axis
Rotation Matrices in 3D – OK,lets return from
homogenous repn
cosθ  sinθ 0
Rotation around the Z-Axis
R z   sinθ cosθ 0
 0 0 1

 cosθ 0 sinθ 
R y   0 1 0  Rotation around the Y-Axis

 sinθ 0 cosθ

1 0 0 
R z  0 cosθ  sinθ Rotation around the X-Axis

0 sinθ cosθ 


Homogeneous Matrices in 3D
H is a 4x4 matrix that can describe a translation, rotation, or both in one matrix
O
1 0 0 Px 
Y
0 1 0 Py 
N H
P
0 0 1 Pz 
X A  
Translation without rotation 0 0 0 1
Z

Y
n x ox ax 0
n oy ay 0
H y
O
N
n z oz az 0
 
X 0 0 0 1
Rotation part:
Z Rotation without translation Could be rotation around z-axis,
A x-axis, y-axis or a combination of
the three.
Homogeneous Continued….
V N 
 O
V The (n,o,a) position of a point relative to the current
V XY
 H A  coordinate frame you are in.
V 
 
 1 

n x ox ax Px   V N 
n   O
oy ay Py  V  V X  n x V N  o x V O  a x V A  Px
V XY  y
n z oz az Pz  V A 
  
0 0 0 1   1 

The rotation and translation part can be combined into a single homogeneous
matrix IF and ONLY IF both are relative to the same coordinate frame.
Finding the Homogeneous Matrix
EX.
J

N W N 
Y  O
I W 
W A 
 
T
P
X
K A O
Z
W X   WI  W N 
 Y  Point relative to the  J  Point relative to the  O  Point relative to the
 W  X-Y-Z frame  W  I-J-K frame  W  N-O-A frame
WZ  W K  W A 
     

 W   Pi   n i
 WI   ni oi ai Pi   W N 
I
oi ai  W  N
 J   
 J    
a j   W O 

 W   nj oj aj Pj   W O 
 W    Pj    n j oj
 W K  Pk  n k  W K  n k ok ak Pk   W A 
ok a k   W A    
   
 1   0 0 0 1   1 
J
W N 
Y N  O
I W 
W A 
 
T
P
X
K A O
Z
 W X  i x jx kx Tx   W I 
 W  Tx  i x
X
jx k x W  I
 Y   
 Y       W   i y jy ky Ty   W J 
 W   Ty   i y jy k y   W J 
 W Z  i z jz kz Tz   W K 
 W Z  Tz  i z jz k z   W k      
   1   0 0 0 1   1 

 W X  i x jx kx Tx   n i oi ai Pi   W N 
W I
 Y   
 
Substituting for  W J   W   i y jy ky Ty   n j oj aj Pj   W O 
W K   W Z  i z jz kz Tz  n k ok ak Pk   W A 
 
     
 1   0 0 0 1  0 0 0 1   1 
W X  W N  i x jx kx Tx   n i oi ai Pi 
 Y  O i
 W   H W  jy ky Ty   n j oj aj Pj 
WZ  W A  H y
i z jz kz Tz  n k ok ak Pk 
      
 1   1  0 0 0 1  0 0 0 1
Product of the two matrices

Notice that H can also be written as:

1 0 0 Tx  i x jx kx 0 1 0 0 Pi   n i oi ai 0
0 1 0 Ty  i y jy ky 0 0 1 0 Pj   n j oj aj 0
H
0 0 1 Tz  i z jz kz 0  0 0 1 Pk  n k ok ak 0
    
0 0 0 1  0 0 0 1  0 0 0 1  0 0 0 1

H = (Translation relative to the XYZ frame) * (Rotation relative to the XYZ frame)
* (Translation relative to the IJK frame) * (Rotation relative to the IJK frame)
The Homogeneous Matrix is a concatenation of numerous
translations and rotations
J
I W N 
Y N  O
W 
W A 
 
T
P
X
A O
K
Z
One more variation on finding H:

H= (Rotate so that the X-axis is aligned with T)


* ( Translate along the new t-axis by || T || (magnitude of T))
* ( Rotate so that the t-axis is aligned with P)
* ( Translate along the p-axis by || P || )
* ( Rotate so that the p-axis is aligned with the O-axis)

This method might seem a bit confusing, but it’s actually an easier way to
solve our problem given the information we have. Here is an example…

You might also like