Perspective CS 418 Computer Graphics John C Hart
- Slides: 28
Perspective CS 418 Computer Graphics John C. Hart
Graphics Pipeline Model Coords Model Xform Viewing Xform World Coords Homogeneous Divide Still Clip Coords. Window Coordinates Window to Viewport Viewing Coords Clipping Perspective Distortion Clip Coords. Viewport Coordinates
Graphics Pipeline y y z z x Screen Coords Clip Coords x Viewing Coords World Coords Model Coords
Foreshortening Projections squash receding surfaces Andrea Mantegna The Lamentation over the Dead Christ
Zollner Illusion
Orthographic Projection View (left, top, -near) Volume y gl. Ortho(left, right, bottom, top, near, far) • Foreshortens • No change in size by depth • Projection matrix simply zeros the z- coordinate -z z x (right, bottom, -far) Viewing Coordinates Ortho Clip Coordinates y x foreshortening
Isometric Projection y x • Foreshortens by using z-coord to shear x and y coordinates xclip = xview + zview yclip = yview – zview • Used in videogames to place sprites z y xclip = xview + yview yclip = -xview + yview + 2 zview x
Isometric Projection v h=x+y v = -x + y + 2 z h z y x z y x v h
Perspective • Brain depends on shape constancy – Real world objects do not resize – Change in size due to depth • Closer objects larger • Farther objects smaller © 1997 Illusionworks
Ames Distorting Room
Hering Illusion
B A C
B A C
Linear Perspective • Brain depends on shape constancy – Real world objects do not resize – Change in size due to depth • Closer objects larger • Farther objects smaller • How large, how small? Albrecht Durer woodcut c. 1525, swiped from Marc Levoy’s CS 48 N notes c. 2007 More Durer, swiped from Fredo Durand’s Art of Depiction ?
Linear Perspective screen y yview yclip d zview -z
Homogeneous Coordinates • Fourth homogeneous coordinate can be any non-zero value • To find the point it corresponds to: – multiply all four coordinates by the same value – precisely the value that makes the fourth coordinate one • When homogeneous coordinate is zero – Denotes a “point” at infinity – Represents a vector instead of a point – Not affected by translation
Linear Perspective screen y yview yclip d zview -z
Perspective Distortion (Using a later version of Perspective matrix that preserves depth ordering) y y x x -z
Parameter d screen y yview y'clip yclip -z zview d’ d Using d yclip = d yview/(-zview) y'clip = d’ yview/(-zview) = (d’/d) yclip Changing parameter d just changes scale of projection Using d’
Parameter d screen y yview y'clip yclip zview d’ d To change degree of perpective distortion, need to change distance from eye to scene, …by moving scene closer or farther to eye, … along z axis in viewing coordinates -z
Stereo
Stereo • Disparity – differences (in image distance) between similar features images (varies with depth) • Stereo methods – Cross eye & wall eye – Anaglyph (colored glasses) – Polarized glasses – Field sequential using alternately blinking lcd’s in the glasses – Autostereograms (barrier strip or lenticular)
Rotation v. Shear
Sheared Perspective • Shear first, then perspective • Shear should preserve plane distance f from eyepoint • Shear should move eyepoint d units perp to view direction • Translate +f in z direction (remember view in -z dir) • Shear the point (0, 0, f ) to the point (-d, 0, f ) (opposite shear) • Translate back, by (0, 0, -f ) • Apply perspective d f -½ d ½ f
- Cs 418
- Glcreatebuffer
- Uiuc cs 418
- Cs 418 interactive computer graphics
- Cs 418 interactive computer graphics
- Hrt 2 hrt
- Graphic monitor and workstation in computer graphics
- Computer graphics introduction ppt
- 1 point perspective house
- Silo perspective vs business process perspective
- Ma-418-0-0-4
- Intelremotemond
- Cos418
- Cos 418
- Cos 418
- Sloppy quorums
- Cos 418
- Cos 418
- Codice palatino 418
- Cos418
- Ley 19 418
- Cos 418
- Cos418
- Cos 418
- Sentencia su-418/19
- Cos 418
- Cos 418
- Cos 418
- Cos418