���Chapter IV�Spaces and Transforms
All class materials including this PowerPoint file are available at
https://github.com/medialab-ku/openGLESbook
Introduction to Computer Graphics with OpenGL ES (J. Han)
Rotation
4-2
R(θ)
Introduction to Computer Graphics with OpenGL ES (J. Han)
Rotation (cont’d)
4-3
Introduction to Computer Graphics with OpenGL ES (J. Han)
Scaling
4-4
1
1
2
2
2
½
(sx, sy) = (2, 2)
(sx, sy) = (2, ½)
(x, y)
Introduction to Computer Graphics with OpenGL ES (J. Han)
Translation and Homogeneous Coordinates
4-5
(x, y)
(dx, dy)
(x+dx, y+dy)
Introduction to Computer Graphics with OpenGL ES (J. Han)
Homogeneous Coordinates
4-6
Introduction to Computer Graphics with OpenGL ES (J. Han)
Homogeneous Coordinates (cont’d)
4-7
Introduction to Computer Graphics with OpenGL ES (J. Han)
Transform Composition
4-8
Introduction to Computer Graphics with OpenGL ES (J. Han)
Transform Composition (cont’d)
4-9
Introduction to Computer Graphics with OpenGL ES (J. Han)
Transform Composition (cont’d)
4-10
Introduction to Computer Graphics with OpenGL ES (J. Han)
Transform Composition (cont’d)
4-11
Introduction to Computer Graphics with OpenGL ES (J. Han)
Affine Transform
4-12
Introduction to Computer Graphics with OpenGL ES (J. Han)
Affine Transform (cont’d)
4-13
Introduction to Computer Graphics with OpenGL ES (J. Han)
Affine Transform (cont’d)
4-14
🡨 [L|t]
Introduction to Computer Graphics with OpenGL ES (J. Han)
Affine Transform (cont’d)
4-15
🡨 [L|t]
Introduction to Computer Graphics with OpenGL ES (J. Han)
Affine Transform (cont’d)
4-16
🡨 [L|t]
Introduction to Computer Graphics with OpenGL ES (J. Han)
3D Scaling
4-17
Introduction to Computer Graphics with OpenGL ES (J. Han)
3D Rotation
4-18
(x,y,z)
(x',y',z')
Introduction to Computer Graphics with OpenGL ES (J. Han)
3D Rotation (cont’d)
4-19
y'
y
z
y
z'
z
Rx Rz
Rx Rz
rotation axis
x 🡨 z
curling start
y 🡨 x
curling end
z 🡨 y
Introduction to Computer Graphics with OpenGL ES (J. Han)
3D Rotation (cont’d)
4-20
Introduction to Computer Graphics with OpenGL ES (J. Han)
3D Rotation (cont’d)
4-21
Introduction to Computer Graphics with OpenGL ES (J. Han)
3D Translation
4-22
Introduction to Computer Graphics with OpenGL ES (J. Han)
3D Affine Transform
4-23
Introduction to Computer Graphics with OpenGL ES (J. Han)
3D Affine Transform (cont’d)
4-24
Introduction to Computer Graphics with OpenGL ES (J. Han)
3D Affine Transform (cont’d)
4-25
[L|t]
Introduction to Computer Graphics with OpenGL ES (J. Han)
3D Affine Transform (cont’d)
4-26
Introduction to Computer Graphics with OpenGL ES (J. Han)
Object Space vs. World Space
4-27
world transform for sphere
Introduction to Computer Graphics with OpenGL ES (J. Han)
Object Space vs. World Space – Unity Example
4-28
[L|t] 🡪
Introduction to Computer Graphics with OpenGL ES (J. Han)
Rotation and Object-space Basis
4-29
R
Introduction to Computer Graphics with OpenGL ES (J. Han)
Rotation and Object-space Basis (cont’d)
4-30
u
v
n
Introduction to Computer Graphics with OpenGL ES (J. Han)
Rotation and Object-space Basis (cont’d)
4-31
=
1
...
0
...
0
1
0
0
...
0
0
1
...
...
n
q
1
q
2
q
0
...
1
0
0
...
...
...
...
0
0
0
T
1
q
T
2
q
T
n
q
reflection along with xy-plane
Introduction to Computer Graphics with OpenGL ES (J. Han)
Rotation and Object-space Basis (cont’d)
4-32
Introduction to Computer Graphics with OpenGL ES (J. Han)
Inverses of Translation and Scaling
4-33
(x, y, z)
(dx, dy, dz)
(x+dx, y+dy, z+dz)
(-dx, -dy, -dz)
Introduction to Computer Graphics with OpenGL ES (J. Han)
Inverse Rotation
4-34
Introduction to Computer Graphics with OpenGL ES (J. Han)
Inverse Rotation (cont’d)
4-35
Introduction to Computer Graphics with OpenGL ES (J. Han)
Basis Change
4-36
(0,2,3)
(wx, wy, wz) vs. (0, 2, 3)
WS OS
Introduction to Computer Graphics with OpenGL ES (J. Han)
Basis Change (cont’d)
4-37
w
Introduction to Computer Graphics with OpenGL ES (J. Han)
Basis Change – Transform Composition Example
4-38
sa = 2 & sb = 1
(1) Transform p into the basis {a, b}.
(2) Scale with sa and sb.
(3) The inverse of (1).
Introduction to Computer Graphics with OpenGL ES (J. Han)
Euler Transforms
4-39
Introduction to Computer Graphics with OpenGL ES (J. Han)
Euler Transforms (cont’d)
4-40
Introduction to Computer Graphics with OpenGL ES (J. Han)
Euler Transforms (cont’d)
4-41
Introduction to Computer Graphics with OpenGL ES (J. Han)
Euler Transforms (cont’d)
4-42
Introduction to Computer Graphics with OpenGL ES (J. Han)
Euler Transforms (cont’d)
4-43
Introduction to Computer Graphics with OpenGL ES (J. Han)
Rotation about an Arbitrary Axis
4-44
Introduction to Computer Graphics with OpenGL ES (J. Han)
Rotation about an Arbitrary Axis (cont’d)
4-45
u
v
n
u
v
n
Introduction to Computer Graphics with OpenGL ES (J. Han)
Rotation about an Arbitrary Axis (cont’d)
4-46
Introduction to Computer Graphics with OpenGL ES (J. Han)
Rotation about an Arbitrary Axis (cont’d)
4-47
Introduction to Computer Graphics with OpenGL ES (J. Han)
Rotation about an Arbitrary Axis (cont’d)
4-48
Introduction to Computer Graphics with OpenGL ES (J. Han)
Rigid Motion
4-49
R
t
Introduction to Computer Graphics with OpenGL ES (J. Han)
Rigid Motion (cont’d)
4-50
TR
Introduction to Computer Graphics with OpenGL ES (J. Han)
Pose and Space Change
4-51
(10,2,0)
WS
OS
[R|t] =
t
t
Introduction to Computer Graphics with OpenGL ES (J. Han)
Pose and Space Change (cont’d)
4-52
(0,2,3) in OS
(10,2,0) in WS
WS
OS
t
WS = OS
[R|t]
in OS
in WS
Introduction to Computer Graphics with OpenGL ES (J. Han)
Pose and Space Change (cont’d)
4-53
WS
OS
t
[R|t] =
[R|t]
Introduction to Computer Graphics with OpenGL ES (J. Han)
Pose and Space Change (cont’d)
4-54
WS
OS
t
[R|t] =
OS
WS
WS
OS
(0,2,3) in OS
(10,2,0) in WS
Introduction to Computer Graphics with OpenGL ES (J. Han)
Pose and Space Change (cont’d)
4-55
[R|t] =
WS
OS
t
Introduction to Computer Graphics with OpenGL ES (J. Han)