viewing
play

Viewing CS418 Computer Graphics John C. Hart Graphics Pipeline - PowerPoint PPT Presentation

Viewing CS418 Computer Graphics John C. Hart Graphics Pipeline Model Model World Viewing Viewing Perspective Coords Xform Coords Xform Coords Distortion Still Homogeneous Clip Clip Clipping Divide Coords. Coords. Window


  1. Viewing CS418 Computer Graphics John C. Hart

  2. Graphics Pipeline Model Model World Viewing Viewing Perspective Coords Xform Coords Xform Coords Distortion Still Homogeneous Clip Clip Clipping Divide Coords. Coords. Window Window Viewport to Coordinates Coordinates Viewport

  3. Graphics Pipeline Model Model World Viewing Viewing Perspective Coords Xform Coords Xform Coords Distortion Still Homogeneous Clip Clip Clipping Divide Coords. Coords. Window Window Viewport to Coordinates Coordinates Viewport             x x s m             y y             s  m W2V Persp View Model             0 z m                         1 1

  4. Graphics Pipeline Model Model World Viewing Viewing Perspective Coords Xform Coords Xform Coords Distortion Still Homogeneous Clip Clip Clipping Divide Coords. Coords. Window Window Viewport to Coordinates Coordinates Viewport       x x s m       M y y       s  m       0 z m             1 1

  5. Transformation Order glutSolidTeapot(1); glRotate3f(-90, 0,0,1); glTranslate3f(0,1,0); glTranslate3f(0,1,0); glRotate3f(-90, 0,0,1); glutSolidTeapot(1); glutSolidTeapot(1); y x z                           x x x x x x s m s m s m                           M M R T M T R y y y y y y                           s  m s  m s  m                           0 0 0 z z z m m m                                  1           1          1 1 1 1

  6. Viewing Transformation Model Model World Viewing Viewing Perspective Coords Xform Coords Xform Coords Distortion Still Homogeneous Clip Clip Clipping Divide Coords. Coords. Window Window Viewport to Coordinates Coordinates Viewport             x x s m             y y             s  m W2V Persp View Model             0 z m                         1 1

  7. Viewing Transformation eye point lookat y point y x x z                 Screen Clip Viewing World Model Persp View Model W2V         Coords Coords Coords Coords Coords                

  8. Viewing World Coordinates Coordinates y lookat point eye point eye point lookat point (along – z axis) (at origin) z y x x z

  9. Viewing World Coordinates Coordinates y lookat point eye point lookat point (along – z axis) y x x z

  10. Viewing World Coordinates Coordinates y lookat point eye point Why not y' these axes? x' y x x z

  11. Viewing World Coordinates Coordinates 1. Specify up direction in world coordinates up y 2. Transform up vector into viewing coordinates lookat point eye point 3. Rotate about z-axis until up vector in x-y plane. z y x x z up vector up vector

  12. Lookat Transformation up eye vector point lookat point y x z

  13. Lookat Transformation 1. Translate the eye point to the origin    1 x   y  1 y   x    1 z z     1

  14. y Lookat Transformation z 1. Translate the eye point to the origin x 2. Rotate the view vector into the negative z-axis      1 x     y  1 y     R x      1 z z         1

  15. Easier Way y • Orthogonalize lookat vector system up v x z

  16. Easier Way y • Orthogonalize lookat vector system up – Let r = v  up /|| v  up || v x r z

  17. Easier Way y • Orthogonalize lookat vector system up u – Let r = v  up /|| v  up || v – Let u = r  v x r z

  18. Easier Way y • Orthogonalize lookat vector system up u – Let r = v  up /|| v  up || v – Let u = r  v – Create rotation matrix from x < r , u ,- v > to < x . y , z > r z R r = x , R u = y , R v = - z

  19. eye Construct Lookat point lookat up point vector • Translate eye point to origin y • Rotate view into -z axis x z – Let v = (lookat - eye)/||lookat - eye|| – Let r = v  up /|| v  up || – Let u = r  v y z x

  20. Viewing Transformation eye point y lookat point x y z x z                 Screen Clip Viewing World Model Persp View Model W2V         Coords Coords Coords Coords Coords                

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend