1 / 18

CS 3388 Projections & Perspective Transformations

CS 3388 Projections & Perspective Transformations. [Hill § 7.1,7.2,7.4]. “Oh noes !”. TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: A A A A A A A. Projections. A projection is the image of something, rather than the thing itself

zoie
Download Presentation

CS 3388 Projections & Perspective Transformations

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 3388Projections & Perspective Transformations [Hill §7.1,7.2,7.4] “Oh noes!” TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: AAAAAAA

  2. Projections • A projection is the image of something, rather than the thing itself • Mathematically, transformation fis a projection if f(p)=f(f(p)) for all p2Rn • Or, P2Rn£n is a projection if P2´P • Q: what is the only invertible ‘projection’? 3D thing pinhole camera 2D image of thing nautilus eye http://pixdaus.com/single.php?id=187022 http://en.wikipedia.org/wiki/File:Pinhole-camera.svg

  3. Orthographic Projection • Project 3D points onto plane (2D image): • Projection lines orthogonal to the projection plane projection lines y projected points z x projection plane

  4. Perspective Projection • Project 3D points onto plane (2D image): • Projection lines pass through center; not orthogonal to projection plane projection lines y projected points z x center of projection projection plane

  5. Properties of Projections i.e.f(p)=p • Many points project to same location • projection not invertible, i.e. can have f(p)=f(q) • point p in projection plane projects to p, i.e. f(p)=p • Orthographic: • parallel 3D lines project to parallel 2D lines • Perspective: • 3D lines project to 2D lines (parallel not preserved) • further objects appear smaller

  6. Perspective Foreshortening • Projection p0=f(p) appears closer to center line as p gets further from plane Q: how far must we travel along this line to ‘hit’ vanishing point? same x in 3D different x0 in 2D x causes lines parallel in 3D to converge to a vanishing point z

  7. Vanishing Points lines parallel in 3D may converge in perspective x Each 3D orientation has its own vanishing point, ... z ... but what family of lines stays parallel even in perspective? two vanishing points http://www.mymodernmet.com/profiles/blogs/flatiron-building-in-ny-will

  8. Your Brain Needs Perspective! different projected size same projected size “Ames room” http://www.flickr.com/photos/leolondon/490312841/ http://www.flickr.com/photos/gandhiji40/399633119/ http://www1.appstate.edu/~kms/classes/psy3203/Depth/AmesDiagram.htm http://www.psychologie.tu-dresden.de/i1/kaw/diverses%20Material/www.illusionworks.com/html/ames_room.html

  9. Your Brain Needs Perspective! http://www.impactlab.net/2006/03/09/amazing-3d-sidewalk-art-photos/

  10. Canonical View Frustum • We “look” down negativez axis • Only “see” 3D objects inside view frustum (DirectX flips z axis!) view frustum (bounded volume) y center of projection (eye / camera) z x near rectangle near plane far plane (left,top) (right,bottom) (z = small constant) (z = large constant) project 3D objects onto 2D near plane!

  11. Canonical View Frustum • Orthographic projection is very similar view frustum near rectangle (rectangular prism) (left,top) (right,bottom) y z x far plane z near plane z

  12. *we revisit this later to preserve ‘depths’ 3D ! 2D Projection* • If point is known, what is its projection? • Intersect projection line with near plane! orthographic perspective slide x,y,z slide z only! x x z z warning: book, OpenGL use z=-n, n>0 notice scaling n merely scales the image!

  13. [Hill p.353,354] Alternate View on Perspective • Two conceptual steps: orthographic projection 3D view frustum perspective transformation linear squash non-linear depth stays parallel linear stretch now not parallel =perspective projection x now parallel z

  14. [Hill p365] Taxonomy of Projections planar projection parallel perspective oblique orthographic

  15. Classes of Transformation • “Projective transformations” includes affine + perspective transformations, not projections!! “projective” perspective (new!) “affine” “linear” “rigid-body” scaling rotation translation shearing reflection

  16. Arbitrary View Frustums • What about eye not looking down z axis? • Don’t move frustum, move world! rigid-body transformation boooooAyn Rand projection calculations easy again! x x z z

  17. Arbitrary View Frustums • Assume eye translated by v, rotated by µ back in canonical form! x x z z (we omit y dimension for simplicity)

  18. [Hill §7.2.2] (uses look “point”) Arbitrary View Frustums • In 2D can also specify eye orientation as a look vector • In 3D, look not enough... need up vector look µ x z #include <cmath> // for atan2(y,x) up look controls yaw and pitch up controls roll look y z x

More Related