DOC PREVIEW
CMU CS 15462 - Viewing

This preview shows page 1-2-3-19-20-39-40-41 out of 41 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 41 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 41 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 41 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 41 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 41 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 41 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 41 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 41 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 41 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

Viewing•Announcements.•A Note About Transformations.•Orthographic and Perspective Projection•Implementation•Vanishing PointsViewing•Announcements.•A Note About Transformations.•Orthographic and Perspective Projection•Implementation•Vanishing PointsAnnouncements•Reading for Thursday: Shirley Ch: 6, & 7Viewing•Announcements.•A Note About Transformations.•Orthographic and Perspective Projection•Implementation•Vanishing PointsViewing•Announcements.•A Note About Transformations.•Orthographic and Perspective Projection•Implementation•Vanishing PointsRotation About An Arbitrary Vector17Computer Graphics 15-462Rigid Body Transformations•A transformation matrix of the formwhere the upper 2x2 submatrix is a rotation matrix and column 3 is a translation vector, is a rigid body transformation.•Any series of rotations and translations results in a rotation and translation of this form (and no change in the distance between vertices)xxxytxyxyyty00121Computer Graphics 15-462Transforming Normals• It’s tempting to think of normal vectors as being like porcupine quills, so they would transform like points• Alas, it’s not so.• We need a different rule to transform normals.chalkboardViewing•Announcements.•A Note About Transformations.•Orthographic and Perspective Projection•Implementation•Vanishing PointsViewing•Announcements.•A Note About Transformations.•Orthographic and Perspective Projection•Implementation•Vanishing Points17Computer Graphics 15-462Viewing and Projection• Our eyes collapse 3-D world to 2-D retinal image(brain then has to reconstruct 3D)• In CG, this process occurs by projection• Projection has two parts:–Viewing transformations: camera position and direction–Perspective/orthographic transformation: reduces 3-D to 2-D• Use homogeneous transformations (of course…)13Computer Graphics 15-462Getting Geometry on the Screen• Transform to camera coordinate system• Transform (warp) into canonical view volume• Clip • Project to display coordinates• RasterizeGiven geometry positioned in the world coordinate system, how do we get it onto the display?http://i200.photobucket.com/albums/aa39/archiebot/rasterization.png14Computer Graphics 15-462Perspective and Orthographic ProjectionOrthographic Projection18Computer Graphics 15-462Viewing and ProjectionBuild this up in stages• Canonical view volume to screen• Orthographic projection to canonical view volume• Perspective projection to orthographic space15Computer Graphics 15-462Orthographic Projectionthe focal point is at infinity, the rays are parallel, and orthogonal to the image planegood model for telephoto lens. No perspective effects.when xy-plane is the image plane (x,y,z) -> (x,y,0) front orthographic viewTelephoto Lenses and Fashion Photographyhttp://farm4.static.flickr.com/3057/2555706112_20a3015ddb.jpg19Computer Graphics 15-462Canonical View VolumeWhy this shape?–Easy to clip to–Trivial to project from 3D to 2D image plane chalkboard20Computer Graphics 15-462Orthographic ProjectionX=l left planeX=r right planeY=b bottom planeY=t top planeZ=n near planeZ=f far planechalkboardWhy near plane? Prevent points behind the camera being seenWhy far plane? Allows z to be scaled to a limited fixed-point value (z-buffering)21Computer Graphics 15-462Arbitrary View PositionsEye position: eGaze direction: gview-up vector: tchalkboardPerspective Projectionsource: http://www.dartmouth.edu/~matc/math5.geometry/unit15/Frisius.gifThe simplest way to look at perspective projection is as painting on a window....source: http://blog.mlive.com/flintjournal/newsnow/2007/11/WINDOW_PAINTING_02.jpgeyewindowcolorpaintedcolorPaint on the window whatever color you see there.16Computer Graphics 15-462Simple Perspective CameraCanonical case:–camera looks along the z-axis–focal point is the origin–image plane is parallel to the xy-plane at distance d– (We call d the focal length, mainly for historical reasons)Image Planeyxz[0,0,d]F=[0,0,0]23Computer Graphics 15-462Perspective Projection of a Pointy_s = d/z yys= dyzHistory of Perspective Projectionsource: http://en.wikipedia.org/wiki/File:Reconstruction_of_the_temple_of_Jerusalem.jpgsource: http://en.wikipedia.org/wiki/File:Giotto_-_Legend_of_St_Francis_-_-07-_-_Confirmation_of_the_Rule.jpgsource: http://en.wikipedia.org/wiki/File:Perugino_Keys.jpg25Computer Graphics 15-462ClippingSomething is missing between projection and viewing...Before projecting, we need to eliminate the portion of scene that is outside the viewing frustumxyzimage planenearfarclipped lineNeed to clip objects to the frustum (truncated pyramid)Now in a canonical position but it still seems kind of tricky...26Computer Graphics 15-462Normalizing the Viewing FrustumSolution: transform frustum to a cube before clippingxyznear farclipped line1110xyzimage planenearfarclipped lineConverts perspective frustum to orthographic frustumYet another homogeneous transform!24Computer Graphics 15-462Perspective ProjectionWarping a perspective projection into and orthographic oneLines for the two projections intersect at the view planeHow can we put this in matrix form? Need to divide by z—haven’t seen a divide in our matrices so far…Requires our w from last time (or h in the book)chalkboardViewing•Announcements.•A Note About Transformations.•Orthographic and Perspective Projection•Implementation•Vanishing PointsViewing•Announcements.•A Note About Transformations.•Orthographic and Perspective Projection•Implementation•Vanishing Points28Computer Graphics 15-462Camera Control Values• All we need is a single translation and angle-axis rotation (orientation), but...• Good animation requires good camera control--we need better control knobs• Translation knob - move to the lookfrom point• Orientation can be specified in several ways:– specify camera rotations– specify a lookat point (solve for camera rotations)29Computer Graphics 15-462A Popular View Specification Approach• Focal length, image size/shape and clipping planes are in the perspective transformation• In addition:– lookfrom: where the focal point (camera) is– lookat: the world point to be centered in the image• Also specify camera orientation about the lookat-l ook f romaxis30Computer Graphics 15-462ImplementationImplementing the lookat/lookfrom/vup viewing scheme(1) Translate by -lookfrom, bring focal point to origin(2) Rotate


View Full Document

CMU CS 15462 - Viewing

Download Viewing
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Viewing and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Viewing 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?