180 likes | 346 Views
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. V up. P eye. P ref. Viewing Transform. V up.
E N D
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
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
Vup k j=kxi Peye i Pref Change-of-basis Matrix ix jx kx Peyex iy jy ky Peyey iz jz kz Peyez 000 1
Camera model What is the difference between these images? Perspective Orthographic
Perspective projection k j i
Perspective projection k j P’ P d i
Simple Perspective k j P’ P d i
Simple Perspective • y’= yd/z • x’= xd/z • z’=d
Simple Perspective x’ 1 0 0 0 x y’ = 0 1 0 0 y z’ 0 0 1 0 z w’ 0 0 1/d 0 1 w’= z/d
Viewing volumes Projected image
Viewing volumes Projected image
CSC418 Computer Graphics Next Lecture • Cannonical space • 3D Clipping • Visibility culling