Upload
sehrish-asif
View
1.400
Download
0
Embed Size (px)
Citation preview
3D Transformations
• Same idea as 2D transformations
– Homogeneous coordinates: (x,y,z,w)
– 4x4 transformation matrices
wz
yx
ponm
lkji
hgfedcba
wz
yx
''
''
Basic 3D Transformations
wz
yx
wz
yx
1000010000100001
'
''
w
z
y
x
t
t
t
w
z
y
x
z
y
x
1000
100
010
001
'
'
'
w
z
y
x
s
s
s
w
z
y
x
z
y
x
1000
000
000
000
'
'
'
wz
yx
wz
yx
1000010000100001
'
''
Identity Scale
Translation Mirror about Y/Z plane
Basic 3D Transformations
w
z
y
x
w
z
y
x
1000
0100
00cossin
00sincos
'
'
'
Rotate around Z axis:
w
z
y
x
w
z
y
x
1000
0cos0sin
0010
0sin0cos
'
'
'
Rotate around Y axis:
wz
yx
wz
yx
10000cossin00sincos00001
'
''
Rotate around X axis:
Reverse Rotations
• Q: How do you undo a rotation of R( )?
• A: Apply the inverse of the rotation… R-1( ) = R(- )
• How to construct R-1( ) = R(- )– Inside the rotation matrix: cos( ) = cos(- )
• The cosine elements of the inverse rotation matrix are unchanged
– The sign of the sine elements will flip
• Therefore… R-1( ) = R(- ) = RT( )