Presentation is loading. Please wait.

Presentation is loading. Please wait.

I N T R O D U C T I O N T O C O M P U T E R G R A P H I C S Andries van Dam 3D Viewing I CIS 736 Computer Graphics Review of Basics 2 of 5: 3D Viewing.

Similar presentations


Presentation on theme: "I N T R O D U C T I O N T O C O M P U T E R G R A P H I C S Andries van Dam 3D Viewing I CIS 736 Computer Graphics Review of Basics 2 of 5: 3D Viewing."— Presentation transcript:

1 I N T R O D U C T I O N T O C O M P U T E R G R A P H I C S Andries van Dam 3D Viewing I CIS 736 Computer Graphics Review of Basics 2 of 5: 3D Viewing I Friday 20 January 2006 Adapted with Permission W. H. Hsu http://www.kddresearch.org

2 I N T R O D U C T I O N T O C O M P U T E R G R A P H I C S Andries van Dam September 11, 2003 3D Viewing I 1/36 History Geometrical Constructions Types of Projection Projection in Computer Graphics From 3D to 2D: Orthographic and Perspective Projection—Part 1

3 I N T R O D U C T I O N T O C O M P U T E R G R A P H I C S Andries van Dam September 11, 2003 3D Viewing I 18/36 Parallel projections used for engineering and architecture because they can be used for measurements Perspective imitates our eyes or a camera and looks more natural Logical Relationship Between Types of Projections

4 I N T R O D U C T I O N T O C O M P U T E R G R A P H I C S Andries van Dam September 11, 2003 3D Viewing I 20/36 Same method as multiview orthographic projections, except projection plane not parallel to any of the coordinate planes; parallel lines are equally foreshortened Isometric: Angles between all three principal axes are equal (120º). The same scale ratio applies along each axis Dimetric: Angles between two of the principal axes are equal; need two scale ratios Trimetric: Angles different between the three principal axes; need three scale ratios Note: different names for different views, but all part of a continuum of parallel projections of the cube; these differ in where the projection plane is relative to its cube Axonometric Projections dimetric isometric dimetric orthographic Carlbom Fig. 3-8

5 I N T R O D U C T I O N T O C O M P U T E R G R A P H I C S Andries van Dam September 11, 2003 3D Viewing I 21/36 Used for: –catalogue illustrations –patent office records –furniture design –structural design Pros: –don’t need multiple views –illustrates 3D nature of object –measurements can be made to scale along principal axes Cons: –lack of foreshortening creates distorted appearance –more useful for rectangular than curved shapes Isometric Projection (1/2) Construction of an isometric projection: projection plane cuts each principal axis by 45° Example Carlbom Fig.2.2

6 I N T R O D U C T I O N T O C O M P U T E R G R A P H I C S Andries van Dam September 11, 2003 3D Viewing I 23/36 Projectors are at an oblique angle to the projection plane; view cameras have accordion housing, used for skyscrapers Pros: –can present the exact shape of one face of an object (can take accurate measurements): better for elliptical shapes than axonometric projections, better for “mechanical” viewing –lack of perspective foreshortening makes comparison of sizes easier –displays some of object’s 3D appearance Cons: –objects can look distorted if careful choice not made about position of projection plane (e.g., circles become ellipses) –lack of foreshortening (not realistic looking) Oblique Projections oblique perspective

7 I N T R O D U C T I O N T O C O M P U T E R G R A P H I C S View Camera source: http://www.usinternet.com/users/rniederman/star01.htm Andries van Dam September 11, 2003 3D Viewing I 24/36

8 I N T R O D U C T I O N T O C O M P U T E R G R A P H I C S Andries van Dam September 11, 2003 3D Viewing I 25/36 Examples of Oblique Projections Construction of an oblique parallel projection Plan oblique projection of a city (Carlbom Fig. 2-6) Front oblique projection of a radio (Carlbom Fig. 2-4)

9 I N T R O D U C T I O N T O C O M P U T E R G R A P H I C S Andries van Dam September 11, 2003 3D Viewing I 26/36 Rules for placing projection plane for oblique views: projection plane should be chosen according to one or several of the following: –it is parallel to the most irregular of the principal faces, or to the one which contains circular or curved surfaces –it is parallel to the longest principal face of the object –it is parallel to the face of interest Example: Oblique View Projection plane parallel to circular face Projection plane not parallel to circular face

10 I N T R O D U C T I O N T O C O M P U T E R G R A P H I C S Andries van Dam September 11, 2003 3D Viewing I 27/36 Cavalier: Angle between projectors and projection plane is 45º. Perpendicular faces are projected at full scale Cabinet: Angle between projectors and projection plane is arctan(2) = 63.4º. Perpendicular faces are projected at 50% scale Main Types of Oblique Projections cavalier projection of unit cube cabinet projection of unit cube

11 I N T R O D U C T I O N T O C O M P U T E R G R A P H I C S Andries van Dam September 11, 2003 3D Viewing I 28/36 Examples of Orthographic and Oblique Projections multiview orthographic cavalier cabinet Carlbom Fig. 3-2

12 I N T R O D U C T I O N T O C O M P U T E R G R A P H I C S Andries van Dam September 11, 2003 3D Viewing I 29/36 Assume object face of interest lies in principal plane, i.e., parallel to xy, yz, or zx planes. (DOP = Direction of Projection, VPN = View Plane Normal) Summary of Parallel Projections 1) Multiview Orthographic –VPN || a principal coordinate axis – DOP || VPN –shows single face, exact measurements 2) Axonometric –VPN || a principal coordinate axis –DOP || VPN –adjacent faces, none exact, uniformly foreshortened (as a function of angle between face normal and DOP) 3) Oblique –VPN || a principal coordinate axis –DOP || VPN –adjacent faces, one exact, others uniformly foreshortened

13 I N T R O D U C T I O N T O C O M P U T E R G R A P H I C S Andries van Dam September 11, 2003 3D Viewing I 30/36 Used for: –advertising –presentation drawings for architecture, industrial design, engineering –fine art Pros: –gives a realistic view and feeling for 3D form of object Cons: –does not preserve shape of object or scale (except where object intersects projection plane) Different from a parallel projection because –parallel lines not parallel to the projection plane converge –size of object is diminished with distance –foreshortening is not uniform Perspective Projections

14 I N T R O D U C T I O N T O C O M P U T E R G R A P H I C S Andries van Dam September 11, 2003 3D Viewing I 31/36 For right-angled forms whose face normals are perpendicular to the x, y, z coordinate axes, the number of vanishing points = number of principal coordinate axes intersected by projection plane Vanishing Points (1/2) Three Point Perspective (z, x, and y-axis vanishing points) Two Point Perspective (z, and x-axis vanishing points) One Point Perspective (z-axis vanishing point) z

15 I N T R O D U C T I O N T O C O M P U T E R G R A P H I C S Andries van Dam September 11, 2003 3D Viewing I 32/36 What happens if same form is turned so that its face normals are not perpendicular to the x, y, z coordinate axes? Vanishing Points (2/2) Although the projection plane only intersects one axis (z), three vanishing points were created Note: can achieve final results which are identical to previous situation in which projection plane intersected all three axes New viewing situation: cube is rotated, face normals are no longer perpendicular to any of the principal axes Note: unprojected cube is depicted here with parallel projection Perspective drawing of the rotated cube

16 I N T R O D U C T I O N T O C O M P U T E R G R A P H I C S Andries van Dam September 11, 2003 3D Viewing I 33/36 We’ve seen two pyramid geometries for understanding perspective projection: Combining these 2 views: Vanishing Points and the View Point (1/3) 1.perspective image is intersection of a plane with light rays from object to eye (COP) 2.perspective image is result of foreshortening due to convergence of some parallel lines toward vanishing points

17 I N T R O D U C T I O N T O C O M P U T E R G R A P H I C S Andries van Dam September 11, 2003 3D Viewing I 34/36 Project parallel lines AB, CD on xy plane Projectors from the eye to AB and CD define two planes, which meet in a line which contains the view point, or eye This line does not intersect the projection plane (XY), because parallel to it. Therefore there is no vanishing point Vanishing Points and the View Point (2/3)

18 I N T R O D U C T I O N T O C O M P U T E R G R A P H I C S Andries van Dam September 11, 2003 3D Viewing I 35/36 Lines AB and CD (this time with A and C behind the projection plane) projected on xy plane: A’B and C’D Note: A’B not parallel to C’D Projectors from eye to A’B and C’D define two planes which meet in a line which contains the view point This line does intersect the projection plane Point of intersection is the vanishing point Vanishing Points and the View Point (3/3) C A

19 I N T R O D U C T I O N T O C O M P U T E R G R A P H I C S Andries van Dam September 11, 2003 3D Viewing I 36/36 Next Time: Projection in Computer Graphics

20 I N T R O D U C T I O N T O C O M P U T E R G R A P H I C S Andries van Dam September 16, 2003 3D Viewing II 8/21 More concrete way to say the same thing as orientation –soon you’ll learn how to express orientation in terms of Look and Up vectors Look Vector –the direction the camera is pointing –three degrees of freedom; can be any vector in 3-space Up Vector –determines how the camera is rotated around the Look vector –for example, whether you’re holding the camera horizontally or vertically (or in between) –projection of Up vector must be in the plane perpendicular to the look vector (this allows Up vector to be specified at an arbitrary angle to its Look vector) Look and Up Vectors Up vector Look vector Position projection of Up vector

21 I N T R O D U C T I O N T O C O M P U T E R G R A P H I C S Andries van Dam September 16, 2003 3D Viewing II 9/21 Analogous to the size of film used in a camera Determines proportion of width to height of image displayed on screen Square viewing window has aspect ratio of 1:1 Movie theater “letterbox” format has aspect ratio of 2:1 NTSC television has an aspect ratio of 4:3, and HDTV is 16:9 Aspect Ratio Kodak HDTV 16:9 NTSC 4:3

22 I N T R O D U C T I O N T O C O M P U T E R G R A P H I C S Andries van Dam September 16, 2003 3D Viewing II 10/21 Determines amount of perspective distortion in picture, from none (parallel projection) to a lot (wide-angle lens) In a frustum, two viewing angles: width and height angles. We specify Height angle, and get the Width angle from (Aspect ratio * Height angle) Choosing View angle analogous to photographer choosing a specific type of lens (e.g., a wide-angle or telephoto lens) View Angle (1/2)

23 I N T R O D U C T I O N T O C O M P U T E R G R A P H I C S Andries van Dam September 16, 2003 3D Viewing II 11/21 Lenses made for distance shots often have a nearly parallel viewing angle and cause little perspective distortion, though they foreshorten depth Wide-angle lenses cause a lot of perspective distortion View Angle (2/2) Resulting pictures

24 I N T R O D U C T I O N T O C O M P U T E R G R A P H I C S Andries van Dam September 16, 2003 3D Viewing II 21/21 Carlbom, Ingrid and Paciorek, Joseph, “Planar Geometric Projections and Viewing Transformations,” Computing Surveys, Vol. 10, No. 4 December 1978 Kemp, Martin, The Science of Art, Yale University Press, 1992 Mitchell, William J., The Reconfigured Eye, MIT Press, 1992 Foley, van Dam, et. al., Computer Graphics: Principles and Practice, Addison-Wesley, 1995 Wernecke, Josie, The Inventor Mentor, Addison-Wesley, 1994 Sources


Download ppt "I N T R O D U C T I O N T O C O M P U T E R G R A P H I C S Andries van Dam 3D Viewing I CIS 736 Computer Graphics Review of Basics 2 of 5: 3D Viewing."

Similar presentations


Ads by Google