viewing transformations viewing parameters viewing projections - parallel - parallel orthographic...
Post on 21-Dec-2015
219 views
TRANSCRIPT
Viewing Transformations
Viewing parameters
Viewing projections
- Parallel
- Parallel orthographic projection
- Parallel oblique projection
Viewing transformations
• Viewing transformations are concerned with projecting 3D objects onto 2D surfaces
View plane
Virtual camera
V
U
N
Xw
Yw Zw
Direction of gaze
View Reference Point(eye position)
Handedness axis
Viewingdistance
View up-direction
Viewing projections
• Parallel– centre of projection in the infinity– the projection lines are parallel
X
Y
Z
Projection plane
Projection lines
Parallel orthographic projection
• Projection lines perpendicular to the projection plane• Transformation matrix
xp = x
yp = yPpar =
1 0 0 0
0 1 0 00 0 0 00 0 0 1
Parallel oblique projection
• Projection lines parallel, but not perpendicular to the projection plane
X
Y
Z
Projection plane
Projection lines
Parallel oblique projection
Pobl =
1 0 0 0
0 1 0 0L cos L sin 0 0
0 0 0 1
Matrix
X
Y
Z
P( 0,0 1)
P'
L
L cos
L sin
Parallel projections
• preserve relative dimensions of the objects
• do not give realistic appearance
Perspective projections
• The projection lines meet in one or more projection centre(s)
X
Y
ZCOP(Centre of Projection)
COP at the centre of the viewing coordinate system
• projection plane is at distance D from the COP
• on the positive part of the z axis (ZCOP = 0)
z
y
D
COP
PP'
P = (x, y, z)
P' = (xp, yp, D )
yp
D = yz xp
D = xz
yp = D yz =
yz/D xp =
D xz =
xz/D
z
y
D
COP
PP'
Transformation matrix
Example point transformation
Pper =
1 0 0 0
0 1 0 00 0 1 00 0 1/D 0
yp = D yz =
yz/D xp =
D xz =
xz/D
Projection plane at the centre of the viewing coordinate system
• projection plane is at distance D from the COP• on the negative part of the z axis (ZCOP = -D)
z
y
D
COPP
P'
P = (x, y, z)
P' = (xp, yp, 0 )
z
y
D
COPP
P'
ypD =
yz+D
xpD =
xz+D
yp = D y
z + D = y
(z/D) + 1 xp = D x
z + D = x
(z/D) + 1
Transformation matrix
Pper =
1 0 0 0
0 1 0 00 0 0 00 0 1/D 1
Example point transformation
yp = D y
z + D = y
(z/D) + 1 xp = D x
z + D = x
(z/D) + 1
Perspective projections
• do not preserve relative dimensions• give realistic appearance
Clipping
• Used to restrict the depth of the projected scene
Back clipping plane
Front clipping plane
View plane