Transcript Lecture9

CSC418 Computer Graphics

Cameras and Projections
Follow lecture notes on 3D Projection and Clipping :
www.dgp.toronto.edu/~karan/courses/csc418/fall_2002/notes/lectures.html
Camera model
Viewing Transform
Vup
Peye
Pref
Viewing Transform
Vup
k=(Peye-Pref)/||Peye-Pref||
Peye
Pref
Viewing Transform
Vup
k
Peye
i=(Vupxk)/|| Vupxk ||
Pref
Viewing Transform
Vup
k
j=kxi
Peye
i
Pref
Change-of-basis Matrix
Vup
k
j=kxi
Peye
i
ix jx kx Peyex
iy jy ky Peyey
iz jz kz Peyez
000 1
Pref
Camera model
Camera model
What is the difference between these images?
Orthographic
Perspective
Perspective projection
k
j
i
Perspective projection
k
j
P’
i
d
P
Simple Perspective
k
j
P’
i
d
P
Simple Perspective



y’= yd/z
x’= xd/z
z’=d
Simple Perspective
x’
y’
z’
w’
=
w’= z/d
1
0
0
0
0 0
1 0
0 1
0 1/d
0
0
0
0
x
y
z
1
Viewing volumes
Projected image
Viewing volumes
Projected image
Viewing Pipeline
CSC418 Computer Graphics
Next Lecture



Cannonical space
3D Clipping
Visibility culling