1 / 16

CS 455 – Computer Graphics

CS 455 – Computer Graphics . Viewing Transformations I. Motivation. Want to see our “virtual” 3-D world on a 2-D screen. Graphics Pipeline. Object Space. Model Transformations. World Space. Viewing Transformation. Eye/Camera Space. Projection & Window Transformation. Screen Space.

reeves
Download Presentation

CS 455 – Computer Graphics

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. CS 455 – Computer Graphics Viewing Transformations I

  2. Motivation Want to see our “virtual” 3-D world on a 2-D screen

  3. Graphics Pipeline Object Space Model Transformations World Space Viewing Transformation Eye/Camera Space Projection & Window Transformation Screen Space

  4. Viewing Transformations • Projection: take a point from m dimensions to n dimensions where n < m • There are essentially two types of viewing transforms: • Orthographic: parallel projection • Points project directly onto the view plane • In eye/camera space (after viewing tranformation): drop z • Perspective: convergent projection • Points project through the origin onto the view plane • In eye/camera space (after viewing tranformation): divide by z

  5. Parallel Projections • We will first deal with orthographic projection • Get the concept and models down • Projection direction is parallel to projection plane normal • Center of projection (COP) is at infinity • Parallel lines remain parallel • All angles are preserved for faces parallel to the projection plane p1 p1’ Center of projection at infinity p2 p2’ Projectors

  6. Orthographic Projection • Points project orthogonally onto (i.e., normal to) the view plane: • Projection lines are parallel y z x

  7. y d x z Projection Environment • We will use a right-handed view system • The eyepoint or camera position is on the +z axis, a distance d from the origin • The view direction is parallel to the z axis • The view plane is in the xy plane and passes through the origin

  8. y (x, y, z) (x’, y’, z’) x z Parallel Projection • A point in 3-space projects onto the viewplane via a projector which is parallel to the z axis • What is (x’, y’, z’)?

  9. (x’, y’, z’) Parallel Projection • Looking down the y axis: (x, y, z) x z • So z’ = 0, x’ = x

  10. (x’, y’, z’) Parallel Projection • Looking down the x axis: y (x, y, z) z So y’ = y

  11. Parallel Projection • Thus, for parallel, orthographic projections, • x’ = x, y’ = y, z’ = 0 • So, to perform a parallel projection on an object, we need to multiply it by some matrix that has this effect What is M? i.e., we simply drop the z coordinate

  12. Perspective Projection • In the real-world, we see things in perspective: • Parallel lines do not look parallel • They converge at some point

  13. y x z Perspective Projection • Points project through the focal point (e.g., eyepoint) onto the view plane: • Projection lines are convergent

  14. Perspective Projection • Center of projection (COP) is no longer at infinity • Projectors form a view frustum that is a pyramid with the tip at the COP eye view plane

  15. Perspective Projection • We will start with the projection plane parallel to the XY plane and perpendicular to the Z axis • Lines parallel to the X or Y axis remain parallel • X and Y distances become shorter as Z becomes more negative, e.g. a cube viewed in perspective: y x

  16. Perspective Projection Computation • Assume the projection plane is normal to the Z axis, located at Z = 0. • Assume the center of projection (COP, eyepoint) is located at Z = d • What is P’(x’, y’, z’)? P(x, y, z) projection plane y P’(x’, y’, z’) x Center of Projection z

More Related