Sie sind auf Seite 1von 17

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

Virtual camera
Yw Zw View up-direction

U Xw Viewing distance

View plane

V Handedness axis

Direction of gaze View Reference Point (eye position)

Viewing projections
Parallel
centre of projection in the infinity the projection lines are parallel
Projection plane

Projection lines

Parallel orthographic projection


Projection lines perpendicular to the projection plane Transformation matrix

Pp a r =

1 0 0 0

0 1 0 0

0 0 0 0

0 0 0 1

xp = x yp = y

Parallel oblique projection


Projection lines parallel, but not perpendicular to the projection plane
Projection lines

Projection plane
Y

Parallel oblique projection


Y

Matrix
1 0 L c os 0
0 1 L sin 0 0 0 0 0 0 0 0 1

L sin
P'

Pob l =

P( 0,0 1) Z

L cos

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)
Y

COP (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)
y P

P'

COP
z

y P P'

COP
z

D
P = (x, y, z) P' = (xp, yp, D )
yp D
yp

y z

xp D
xp

x z

Dy y = = z z/ D

Dx x = = z z/ D

Transformation matrix

Pper =

1 0 0 0

0 0 1 0 0 1 0 1/D

0 0 0 0


xp Dx x = = z z/ D

yp

Dy y = = z z/ D

Example point transformation

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)
y

P'

COP

P'

COP

P = (x, y, z) P' = (xp, yp, 0 )

yp y = D z+D Dy y yp = = z+ D (z/ D) + 1

xp x = D z+D Dx x xp = = z+ D (z/ D) + 1

Transformation matrix

Pper =

1 0 0 0

0 0 1 0 0 0 0 1/D

0 0 0 1

Dy y yp = = z+ D (z/ D) + 1

Dx x xp = = z+ D (z/ D) + 1

Example point transformation

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

Das könnte Ihnen auch gefallen