You are on page 1of 10

'

3D Viewing
Chapter 7 3D pipeline 3D Viewing coordinates and viewing transformations Projections

&
1

'

3D Viewing Overview

More complicated than 2D because there are more possibilities. Coordinate reference for viewing needs more parameters than in 2D. What kind of projection? How to give the illusion of depth? Identifying visible lines and surfaces Surface rendering

&
2

'

Camera Position and Orientation


To know how to display a 3D scene, we need to know Where we are looking from What direction we are looking Which direction is up One way to model this is to think of how you take a picture with a camera

The lm plane is where the image will be.

&
3

'

If you look at a wire frame diagram, it can be dicult to tell what is in front.

This can also be true for solid gures if the color is at. Possible solutions Make brightness inversely proportional to distance from viewer. Make distant objects fuzzier like the eect of haze in real life. Give visible lines dierent brightness (or color) than invisible ones. Render surfaces with lighting eects which gives cues about orientation. &
4

'

3D Viewing Pipeline

Use a similar sequence to what we did in 2D.

You need more information to specify the viewing transformation. You need to specify how to project from 3D to 2D.

&
5

'

Specifying Viewing Coordinates

Specify a viewing reference frame by giving P0 = (x0 , y0 , z0 ) which is the viewing origin (eye or camera position). V which is the view-up vector zview axis eye is usually looking toward zview = inf.

&
6

'

uvn Coordinate Reference Frame

Usually consider a viewing plane that is perpendicular to zview . View-up vector establishes where up is in the viewing plane. It need to be perpendicular to zview . Third coordinate direction is determined by requirement that the directions be orthogonal. uvn coordinate system dened by n = u =
N |N|

yview

= =

(nx , ny , nz ) (ux , uy , uz )
v

VN |V |

v = n u = (vx , vy , vz )
n zview u xview

&
7

'

World to Viewing Coordinate Transformations

Translate viewing origin to world origin 1 0 0 1 T = 0 0 0 0

0 x0 0 1 0

y0 z0 1 axes 0 0 0 1 %

Rotate to align viewing and world coordinate ux uy uz v x vy vz B= nx ny nz 0 0 0 &


8

'

Composite transform is ux v x =RT = nx 0 uy vy ny 0 uz vz nz 0 u P0

MW C V C

v P0 n P0 1

where P0 is the vector from the world coordinate origin to the viewing coordinate origin.

&
9

'

Projections
Parallel Perspective

Coordinates are transformed along parallel lines Relative sizes are preserved Parallel lines remain parallel

Projection lines converge at a point More distant objects are relatively smaller Closer to the way we actually see things

&
10

You might also like