the camera analogy n.
Download
Skip this Video
Loading SlideShow in 5 Seconds..
The Camera Analogy PowerPoint Presentation
Download Presentation
The Camera Analogy

Loading in 2 Seconds...

play fullscreen
1 / 14

The Camera Analogy - PowerPoint PPT Presentation


  • 188 Views
  • Uploaded on

The Camera Analogy. Set up your tripod and point the camera at the scene (viewing transformation) Arrange the scene to be photographed into the desired composition (modeling transformation) Choose a camera lens or adjust the zoom (projection transformation)

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

The Camera Analogy


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.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
    Presentation Transcript
    1. The Camera Analogy • Set up your tripod and point the camera at the scene (viewing transformation) • Arrange the scene to be photographed into the desired composition (modeling transformation) • Choose a camera lens or adjust the zoom (projection transformation) • Determine how large you want the final photograph to be (viewport transformation)

    2. Computer Steps • Viewing (Positioning the viewing volume in the world – moving the position and orientation of the eye) • Modeling (Positioning the models in the world – translate, scale, rotate) • Projection (Determine the shape of the view volume) • Viewport (Deciding how large/small you want the final photograph to be)

    3. Stages of Vertex Transformation • The viewing and modeling transformations you specify are combined to form the modelview matrix. • The modelview matrix is applied to the incoming object coordinates to yield eye coordinates • Next, OpenGL applies the projection matrix to yield clip coordinates. This transformation defines a viewing volume and objects outside this volume are clipped so that they are not drawn in the final scene.

    4. Stages of Vertex Transformation • If a perspective projection is being performed, a perspective division is done by dividing coordinates by w to produce normalized device coordinates. • Finally, the transformed coordinates are converted to window coordinates by applying the viewport transformation. You can manipulate the dimensions of the viewport to cause the final image to be enlarged, shrunk, or stretched.

    5. Stages of Vertex Transformation

    6. The Viewing Transformation • Positioning the view volume in the world • Achieved in OpenGL by glMatrixMode (GL_MODELVIEW); glLoadIdentity() gluLookAt (eyex, eyey, eyez, centerx, centery, centerz, upx, upy, upz);

    7. Viewing: gluLookAT • Takes 9 GLdouble arguments • (eyex, eyey, eyez) is the position of the eye or the viewpoint. • (centerx, centery, centerz) specifies some point along the desired line of site, but typically specifies some point in the center of the scene being looked at. • (upx, upy, upz) arguments indicate which direction is up (that is the direction from the bottom to the top of the viewing volume).

    8. Modeling • glTranslate*() to move objects in the world • glScale*() to resize objects in the world • glRotate*() to rotate objects in the world • Actually gluLookAt() encapsulates several OpenGL commands – specifically glTranslate*() and glRotate*().

    9. Projection • Specify the view volume • We will start with an orthographic projection • The view volume will be a rectangular parallelpiped, or more informally, a box. • Distance from the camera will not affect how large an object appears. • Used in applications where it is crucial to maintain actual sizes of objects & angles

    10. Orthographic Projection

    11. glOrtho() • Creates an orthographic parallel viewing volume. glOrtho (left, right, bottom, top, near, far); (left, bottom, -near) and (right, top, -near) are points on the near clipping plane. (left, bottom, -far) and (right, top, -far) are points on the far clipping plane.

    12. Viewport Transformation