projections angel: interactive computer graphics

Download Projections Angel: Interactive Computer Graphics

If you can't read please download the document

Upload: lenard-wilcox

Post on 08-Jan-2018

233 views

Category:

Documents


0 download

DESCRIPTION

Taxonomy of Projections FVFHP Figure 6.10

TRANSCRIPT

Projections Angel: Interactive Computer Graphics Road in perspective Taxonomy of Projections FVFHP Figure 6.10 Taxonomy of Projections Parallel Projection Angel Figure 5.4 Center of projection is at infinity Direction of projection (DOP) same for all pointsDirection of projection (DOP) same for all points Center of projection is at infinity Direction of projection (DOP) same for all pointsDirection of projection (DOP) same for all points DOP View Plane Orthographic Projections Angel Figure 5.5 TopSide Front DOP perpendicular to view plane Oblique Projections H&B DOP not perpendicular to view plane Cavalier (DOP = 45 o ) tan( ) = 1 Cabinet (DOP = 63.4 o ) tan( ) = 2 Orthographic Projection Simple Orthographic Transformation Original world units are preserved Pixel units are preferredPixel units are preferred Simple Orthographic Transformation Original world units are preserved Pixel units are preferredPixel units are preferred Perspective Transformation First discovered by Donatello, Brunelleschi, and DaVinci during Renaissance Objects closer to viewer look larger Parallel lines appear to converge to single point First discovered by Donatello, Brunelleschi, and DaVinci during Renaissance Objects closer to viewer look larger Parallel lines appear to converge to single point Perspective Projection Angel Figure Point Perspective 2-Point Perspective 1-Point Perspective How many vanishing points? Perspective Projection In the real world, objects exhibit perspective foreshortening: distant objects appear smaller The basic situation: In the real world, objects exhibit perspective foreshortening: distant objects appear smaller The basic situation: Perspective Projection When we do 3-D graphics, we think of the screen as a 2-D window onto the 3-D world: How tall should this bunny be? Perspective Projection The geometry of the situation is that of similar triangles. View from above: What is x ? The geometry of the situation is that of similar triangles. View from above: What is x ? d P (x, y, z)X Z View plane (0,0,0) x = ? Perspective Projection Desired result for a point [x, y, z, 1] T projected onto the view plane: What could a matrix look like to do this? Desired result for a point [x, y, z, 1] T projected onto the view plane: What could a matrix look like to do this? A Perspective Projection Matrix Answer:Answer: Example: Or, in 3-D coordinates: Example: Projection Matrices Now that we can express perspective foreshortening as a matrix, we can compose it onto our other matrices with the usual matrix multiplication End result: a single matrix encapsulating modeling, viewing, and projection transforms Now that we can express perspective foreshortening as a matrix, we can compose it onto our other matrices with the usual matrix multiplication End result: a single matrix encapsulating modeling, viewing, and projection transforms Perspective vs. Parallel Perspective projection +Size varies inversely with distance - looks realistic Distance and angles are not (in general) preserved Parallel lines do not (in general) remain parallel Parallel projection +Good for exact measurements +Parallel lines remain parallel Angles are not (in general) preserved Less realistic looking Perspective projection +Size varies inversely with distance - looks realistic Distance and angles are not (in general) preserved Parallel lines do not (in general) remain parallel Parallel projection +Good for exact measurements +Parallel lines remain parallel Angles are not (in general) preserved Less realistic looking Classical Projections Angel Figure 5.3 A 3D Scene Notice the presence of the camera, the projection plane, and the world coordinate axes Viewing transformations define how to acquire the image on the projection plane Notice the presence of the camera, the projection plane, and the world coordinate axes Viewing transformations define how to acquire the image on the projection plane Q1 Using the origin as the centre of projection, derive the perspective transformation onto the plane passing through the point R 0 (x 0,y 0,z 0 ) and having normal vector N=n 1 i+n 2 j+n 3 k A1 P(x,y,z) is projected onto P(x,y,z) x=x, y= y, z= z n 1 x+n 2 y+n 3 z=d (where d=n 1 x 0 +n 2 y 0 +n 3 z 0 ) =d/(n 1 x+n 2 y+n 3 z) d d Per N,R0 = 0 d d d 0 n 1 n 2 n 3 0 n 1 n 2 n 3 0 P(x,y,z) is projected onto P(x,y,z) x=x, y= y, z= z n 1 x+n 2 y+n 3 z=d (where d=n 1 x 0 +n 2 y 0 +n 3 z 0 ) =d/(n 1 x+n 2 y+n 3 z) d d Per N,R0 = 0 d d d 0 n 1 n 2 n 3 0 n 1 n 2 n 3 0 Q2 Find the perspective projection onto the view plane z=d where the centre of projection is the origin(0,0,0) Q3 Derive the general perspective transformation onto a plane with reference point R 0 (x 0,y 0,z 0 ), normal vector N=n 1 i+n 2 j+n 3 k, and using C(a,b,c) as the centre of projection A3 Per N,R0 =T C. Per N,R0.T -C Q4 Derive parallel projection onto xy plane in the direction of projection V=ai+bj+ck A4 x-x=ka, y-y=kb, z-z=kc K=-z/c (z=0 on xy plane) 1 0 -a/c 1 0 -a/c Par V = 0 1 -b/c x-x=ka, y-y=kb, z-z=kc K=-z/c (z=0 on xy plane) 1 0 -a/c 1 0 -a/c Par V = 0 1 -b/c