1 / 33

Viewing (Part 1)

Viewing (Part 1). Projection types Positioning of the camera Defining the camera frame Simple perspective projection matrix Simple orthogonal projection matrix. Orthographic Projections of a Temple. Viewing. (Center of Projection). Perspective Viewing.

shae
Download Presentation

Viewing (Part 1)

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Viewing (Part 1) • Projection types • Positioning of the camera • Defining the camera frame • Simple perspective projection matrix • Simple orthogonal projection matrix

  2. Orthographic Projections of a Temple

  3. Viewing (Center of Projection)

  4. Perspective Viewing

  5. Movement of the COP to infinity:Orthographic Projections

  6. Orthographic Projections

  7. Initial Camera Position

  8. Positioning of the Camera • Specify the position indirectly by applying a sequence of rotations and translations to the model-view matrix (before adding objects to the scene). • Using OpenGL viewing APIs

  9. Movement of the Camera and World Frames Initial Configuration After change in model-view matrix glTranslate(0.0, 0.0, -d)

  10. Example of Positioning the Camera

  11. Example of Positioning the Camera glMatrixMode(GL_MODELVIEW); glLoadIdentity(); glTranslatef(0.0, 0.0, -d); glRotatef(-90.0, 0.0, 1.0, 0.0);

  12. y x z Another example:Creating an isometric view of a cube Ry Rx

  13. y x z Rx Cube after Rotation about X-Axis

  14. Rx Rotation angles y M = T Rx Ry • Ry: 45 degrees • Rx: 35.26 degrees Ry x z

  15. Calculation of R

  16. Final transformation matrix

  17. How to specify in OpenGL? glMatrixMode(GL_MODELVIEW); glLoadIdentity(); glTranslatef(0.0, 0.0, -d); glRotatef(35.26, 1.0, 0.0, 0.0); glRotatef(45.0, 0.0, 1.0, 0.0);

  18. Movement of the Camera Frame Initial Configuration After change in Camera Frame

  19. Defining the Camera Frame n: View-plane Normal (VPN) VUP: View-Up Vector VRP: View-Reference Point Projection plane u-v-n system Viewing coordinate system

  20. Defining the Camera Frame in OpenGL set_view_reference_point (x, y, z); set_view_plane_normal (nx, ny, nz); set_view_up (vup_x, vup_y, vup_z);

  21. Representing u-v-n in x-y-z

  22. Building the viewing transformation matrix RT=

  23. VPN Look-at Positioning At point VPN Eye point

  24. Look-at Positioning gluLookAt (eyex, eyey, eyez, atx, aty, atz, upx, upy, upz);

  25. Describing camera location usingRoll, Pitch, and Yaw Center of mass

  26. Describing camera location using Elevation and Azimuth Polar coordinate system

  27. Simple camera General camera -z -z Lens Projection plane Perspective projection matrix in case of simple camera

  28. Top view Side view (xp, - d) (yp, - d) z = -d z = -d Projection plane (z = -d) Perspective Projection

  29. (x, z) (xp, - d) zp = -d Transformation equations Division by z cases further objects to become smaller (non-uniform foreshortening)

  30. q Simple Perspective Projection Matrix

  31. Projection Pipeline

  32. Orthogonal Projection

  33. Simple Orthogonal Projection

More Related