180 likes | 273 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 w=(Peye-Pref)/||Peye-Pref|| Peye Pref
Viewing Transform Vup w Peye u=(Vupxw)/|| Vupxw|| Pref
Viewing Transform Vup w v=wxu Peye u Pref
Vup w v=wxu Peye u Pref Change-of-basis Matrix ux vx wx Peyex uy vy wy Peyey uz vz wz Peyez 000 1
Camera model What is the difference between these images? Perspective Orthographic
Perspective projection w v u
Perspective projection w v P’ P d u
Simple Perspective w v P’ P d u
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