Perspective Projections

Total Page:16

File Type:pdf, Size:1020Kb

Perspective Projections AML710 CAD LECTURE 9 PERSPECTIVE PROJECTIONS 1. Perspective Transformations and Projections a) Single point b) Two point c) Three Point 2. Vanishing points and trace points Generalized 4 x 4 transformation matrix in homogeneous coordinates »a b c p … d e i q [T] = … …g i j r … l m n s Perspective transformations Linear transformations – local scaling, shear, rotation reflection Translations l, m, n along x, y, and z axis Overall scaling 1 Perspective Transformation If any of the first 3 elements in the last column of 4x4 transformation matrix is non-zero a perspective transformation results »1 0 0 0 … 0 1 0 0 [x y z 1]… = [x y z (rz +1)] …0 0 1 r … 0 0 0 1 * * * » x y z ÿ [x y z 1]= … 1Ÿ rz +1 rz +1 rz +1 ⁄ Perspective Projection To obtain perspective projection, we project the results of perspective transformation on to a any of the orthographic projection planes, say, z=0 plane. »1 0 0 0ÿ»1 0 0 0ÿ »1 0 0 0ÿ … Ÿ… Ÿ … Ÿ 0 1 0 0 0 1 0 0 0 1 0 0 [x y z 1]… Ÿ… Ÿ = [x y z 1]… Ÿ = [x y 0 (rz +1)] …0 0 1 rŸ…0 0 0 0Ÿ …0 0 0 rŸ … Ÿ… Ÿ … Ÿ 0 0 0 1⁄ 0 0 0 1⁄ 0 0 0 1⁄ * * * » x y ÿ [x y z 1]= … 0 1Ÿ rz +1 rz +1 ⁄ 2 Perspective Projection – Scaling effect y screen e Projectors g a Im COP x ct je b O z t t c c e e j j b b O O COP Vanishing Point The Perspective Projection of a Point Consider the following figure where using similar triangles we can write the transformed coordinates as: x* x x = x* = z z − z z c c 1− zc y* y y = y* = *2 *2 2 2 z P* x + zc x + (zc − z) 1− zc Y* Let P X* z y 1 x y r = − ; x zc 1+ rz 1+ rz zc The origin is unaffected. If the plane of projection passes through the object, then that section of the object is shown at true size and true shape 3 Perspective projection of line parallel to z-axis A z 1. Perspective Vanishing transformation of AB point yields A’B’ A’ y B 1/r 2. Orthographic B’ projection of A’B’ gives the required A’’ projection A”B”on B’’ -1/r z=0 plane COP Projection plane x 1. The original line AB and transformed line A’B’ intersect the z=0 plane at the same point on it. 2. The line A’B’ intersects z axis at z=1/r 3. This point is called the vanishing point Perspective Transformation The effect of the perspective transformation is to bring a point at infinity to a finite value in the 3D space The entire semi-infinite positive space 0≤z≤∞ is transformed to finite positive half-space 0≤z*≤1/r A point at infinity can be shown to transform to a finite distance »1 0 0 0 … 0 1 0 0 [0 0 1 0]… = [0 0 1 1] …0 0 1 r r … 0 0 0 1 4 Perspective Transformations A Single Point Perspective A single point perspective transformation with respect to z- axis »1 0 0 0 … 0 1 0 0 [x y z 1]… = [x y z (rz +1)] …0 0 1 r … 0 0 0 1 * * * » x y z ÿ [x y z 1]= … 1Ÿ rz +1 rz +1 rz +1 ⁄ Now the perspective projection is obtained by concatenating the orthographic projection matrix »1 0 0 0ÿ»1 0 0 0ÿ »1 0 0 0ÿ … Ÿ… Ÿ … Ÿ 0 1 0 0 0 1 0 0 0 1 0 0 [T ] = [P ][P ] = … Ÿ… Ÿ = … Ÿ t z …0 0 1 rŸ…0 0 0 0Ÿ …0 0 0 rŸ … Ÿ… Ÿ … Ÿ 0 0 0 1⁄ 0 0 0 1⁄ 0 0 0 1⁄ * * * » x y ÿ [x y z 1]= … 0 1Ÿ rz +1 rz +1 ⁄ 5 A Single Point Perspective A single point perspective transformation with respect to z-axis The COP is on +ve z-axis and the V.P is equal distance away on –ve z- axis Perspective Projection of a centered cube A Single Point Perspective A single point perspective transformation with respect to x- axis and y-axis are given below respectively »1 0 0 pÿ»1 0 0 0ÿ »1 0 0 p … Ÿ… Ÿ … 0 1 0 0 0 1 0 0 0 1 0 0 [T ] = [P ][P ] = … Ÿ… Ÿ = … t z …0 0 1 0Ÿ…0 0 0 0Ÿ …0 0 0 0 … Ÿ… Ÿ … 0 0 0 1⁄ 0 0 0 1⁄ 0 0 0 1 » x y ÿ [x* y* z* 1]= … 0 1Ÿ px +1 px +1 ⁄ »1 0 0 0ÿ»1 0 0 0ÿ »1 0 0 0ÿ … Ÿ… Ÿ … Ÿ 0 1 0 q 0 1 0 0 0 1 0 q [T ] = [P ][P ] = … Ÿ… Ÿ = … Ÿ t z …0 0 1 0Ÿ…0 0 0 0Ÿ …0 0 0 0Ÿ … Ÿ… Ÿ … Ÿ 0 0 0 1⁄ 0 0 0 1⁄ 0 0 0 1⁄ » x y ÿ [x* y* z* 1]= … 0 1Ÿ qy +1 qy +1 ⁄ 6 A Single Point Perspective Numerical Example: A single point perspective transformation has to be performed on a unit cube from a center zc=10 on the z-axis, followed by its projection on z=0 plane Sol:Since zc=10 , r=-1/ zc= -1/10= -0.1 The perspective projection matrix for this problem can be written as »1 0 0 0 … 0 1 0 − 0.1 [U ][T ] = [U ][P ] = [U ]… r …0 0 0 0 … 0 0 0 1 Two Point Perspective Projection The two point perspective projection can directly be obtained on similar lines as: »1 0 0 pÿ »1 0 0 pÿ … Ÿ … Ÿ 0 1 0 q 0 1 0 q [T ] = [P ] = … Ÿ = … Ÿ pq …0 0 0 0Ÿ …0 0 0 0Ÿ … Ÿ … Ÿ VP 0 0 0 1⁄ 0 0 0 1⁄ » x y ÿ [x* y* z* 1]= … 0 1Ÿ px + qy +1 px + qy +1 ⁄ »1 0 0 pÿ»1 0 0 0ÿ »1 0 0 pÿ … Ÿ… Ÿ … Ÿ 0 1 0 0 0 1 0 q 0 1 0 q [T ] = [P ] = [P ][P ] = … Ÿ… Ÿ = … Ÿ pq p q …0 0 0 0Ÿ…0 0 0 0Ÿ …0 0 0 0Ÿ … Ÿ… Ÿ … Ÿ VP 0 0 0 1⁄ 0 0 0 1⁄ 0 0 0 1⁄ 7 Three Point Perspective Projection The three point perspective projection can be obtained on similar lines as: »1 0 0 pÿ»1 0 0 0ÿ »1 0 0 p … Ÿ… Ÿ … 0 1 0 q 0 1 0 0 0 1 0 q [T ] = [P ][P ] = … Ÿ… Ÿ = … t z …0 0 1 r Ÿ…0 0 0 0Ÿ …0 0 0 r … Ÿ… Ÿ … 0 0 0 1⁄ 0 0 0 1⁄ 0 0 0 1 » x y ÿ [x* y* z* 1]= … 0 1Ÿ px + qy + rz +1 px + qy + rz +1 ⁄ Some Techniques to produce Perspective Projections Just applying the perspective transformation may not show all details. To view 3 faces of a cuboid, a translation, one or more rotations are used before applying the perspective projections. One translation followed by a single point Pers. Projn. »1 0 0 0ÿ»1 0 0 0 ÿ »1 0 0 0 ÿ … Ÿ… Ÿ … Ÿ 0 1 0 0 0 1 0 0 0 1 0 0 [T ] = [T ][P ] = … Ÿ… Ÿ = … Ÿ xyz rz …0 0 0 0Ÿ…0 0 0 −1/ z Ÿ …0 0 0 −1/ z Ÿ … Ÿ… c Ÿ … c Ÿ l m n 1⁄ 0 0 0 1 ⁄ l m 0 (1− n) / zc ⁄ Note that the scaling factor of (1-n)/Zc appearing in the above result. It is close to reality as the objects gets smaller away from the observerAs Zc h, the scale effect disappears 8 One translation followed by a single point Perspective The scale effect »1 0 0 0ÿ»1 0 0 0 ÿ »1 0 0 0 … Ÿ… Ÿ … 0 1 0 0 0 1 0 0 0 1 0 0 [T ] = [T ][P ] = … Ÿ… Ÿ = … xyz rz …0 0 0 0Ÿ…0 0 0 −1/ z Ÿ …0 0 0 −1/ z … Ÿ… c Ÿ … c l m n 1⁄ 0 0 0 1 ⁄ l m 0 (1− n) / zc y COP z -z -y One Rotation and Single Point Perspective Consider the transformation matrix for rotation about the y- axis by an angle φ, followed by a single point perspective projection on the plane z=0 from a COP at z=zc »cosφ 0 − sinφ 0ÿ»1 0 0 0 ÿ … Ÿ… Ÿ 0 1 0 0 0 1 0 0 [T] = [R ][P ] = … Ÿ… Ÿ φ rz …sinφ 0 cosφ 0Ÿ…0 0 0 −1/ z Ÿ … Ÿ… c Ÿ 0 0 0 1⁄ 0 0 0 1 ⁄ » sinφ ÿ …cosφ 0 − sinφ Ÿ Two Point … zc Ÿ … 0 1 0 0 Ÿ Perspective = cosφ …sinφ 0 cosφ − Ÿ … z Ÿ … c Ÿ 0 0 0 1 ⁄ 9 One Rotation and Single Point Perspective • Thus a single rotation about a principal axis perpendicular to the one on which the COP lies is equivalent to the two point perspective transformation. • However rotation about the same axis on which COP lies does not have this effect » sinφ …cosφ 0 − sinφ Two Point … zc … 0 1 0 0 Perspective = cosφ …sinφ 0 cosφ − … z … c 0 0 0 1 Two Rotations and Single Point Perspective Consider the transformation matrix for rotation about the y-axis by an angle φ, followed by rotation about the x-axis by an angle θ, and a single point perspective projection on the plane z=0 from a cop at z=zc »cosφ 0 −sinφ 0ÿ»1 0 0 0ÿ»1 0 0 0 ÿ … 0 1 0 0Ÿ…0 cosθ sinθ 0Ÿ…0 1 0 0 Ÿ [T ] = [R y ][Rx ][Prz ] = …sinφ 0 cosφ 0Ÿ…0 −sinθ cosθ 0Ÿ…0 0 0 −1/ zc Ÿ 0 0 0 1⁄ 0 0 0 1⁄ 0 0 0 1 ⁄ » sinφ cosθ ÿ …cosφ sinφ sinθ 0 Ÿ … zc Ÿ sinθ Three Point … 0 cosθ 0 − Ÿ Perspective = … z Ÿ … c Ÿ cosφ cosθ …sinφ − cosφ sinθ 0 − Ÿ … zc Ÿ … 0 0 0 1 ⁄Ÿ 10 Perspective Transformations: Vanishing Points There are two methods of finding VPs 1.
Recommended publications
  • An Analytical Introduction to Descriptive Geometry
    An analytical introduction to Descriptive Geometry Adrian B. Biran, Technion { Faculty of Mechanical Engineering Ruben Lopez-Pulido, CEHINAV, Polytechnic University of Madrid, Model Basin, and Spanish Association of Naval Architects Avraham Banai Technion { Faculty of Mathematics Prepared for Elsevier (Butterworth-Heinemann), Oxford, UK Samples - August 2005 Contents Preface x 1 Geometric constructions 1 1.1 Introduction . 2 1.2 Drawing instruments . 2 1.3 A few geometric constructions . 2 1.3.1 Drawing parallels . 2 1.3.2 Dividing a segment into two . 2 1.3.3 Bisecting an angle . 2 1.3.4 Raising a perpendicular on a given segment . 2 1.3.5 Drawing a triangle given its three sides . 2 1.4 The intersection of two lines . 2 1.4.1 Introduction . 2 1.4.2 Examples from practice . 2 1.4.3 Situations to avoid . 2 1.5 Manual drawing and computer-aided drawing . 2 i ii CONTENTS 1.6 Exercises . 2 Notations 1 2 Introduction 3 2.1 How we see an object . 3 2.2 Central projection . 4 2.2.1 De¯nition . 4 2.2.2 Properties . 5 2.2.3 Vanishing points . 17 2.2.4 Conclusions . 20 2.3 Parallel projection . 23 2.3.1 De¯nition . 23 2.3.2 A few properties . 24 2.3.3 The concept of scale . 25 2.4 Orthographic projection . 27 2.4.1 De¯nition . 27 2.4.2 The projection of a right angle . 28 2.5 The two-sheet method of Monge . 36 2.6 Summary . 39 2.7 Examples . 43 2.8 Exercises .
    [Show full text]
  • Viewing in 3D
    Viewing in 3D Viewing in 3D Foley & Van Dam, Chapter 6 • Transformation Pipeline • Viewing Plane • Viewing Coordinate System • Projections • Orthographic • Perspective OpenGL Transformation Pipeline Viewing Coordinate System Homogeneous coordinates in World System zw world yw ModelViewModelView Matrix Matrix xw Tractor Viewing System Viewer Coordinates System ProjectionProjection Matrix Matrix Clip y Coordinates v Front- xv ClippingClipping Wheel System P0 zv ViewportViewport Transformation Transformation ne pla ing Window Coordinates View Specifying the Viewing Coordinates Specifying the Viewing Coordinates • Viewing Coordinates system, [xv, yv, zv], describes 3D objects with respect to a viewer zw y v P v xv •A viewing plane (projection plane) is set up N P0 zv perpendicular to zv and aligned with (xv,yv) yw xw ne pla ing • In order to specify a viewing plane we have View to specify: •P0=(x0,y0,z0) is the point where a camera is located •a vector N normal to the plane • P is a point to look-at •N=(P-P)/|P -P| is the view-plane normal vector •a viewing-up vector V 0 0 •V=zw is the view up vector, whose projection onto • a point on the viewing plane the view-plane is directed up Viewing Coordinate System Projections V u N z N ; x ; y z u x • Viewing 3D objects on a 2D display requires a v v V u N v v v mapping from 3D to 2D • The transformation M, from world-coordinate into viewing-coordinates is: • A projection is formed by the intersection of certain lines (projectors) with the view plane 1 2 3 ª x v x v x v 0 º ª 1 0 0 x 0 º « » «
    [Show full text]
  • Squaring the Circle in Panoramas
    Squaring the Circle in Panoramas Lihi Zelnik-Manor1 Gabriele Peters2 Pietro Perona1 1. Department of Electrical Engineering 2. Informatik VII (Graphische Systeme) California Institute of Technology Universitat Dortmund Pasadena, CA 91125, USA Dortmund, Germany http://www.vision.caltech.edu/lihi/SquarePanorama.html Abstract and conveying the vivid visual impression of large panora- mas. Such mosaics are superior to panoramic pictures taken Pictures taken by a rotating camera cover the viewing with conventional fish-eye lenses in many respects: they sphere surrounding the center of rotation. Having a set of may span wider fields of view, they have unlimited reso- images registered and blended on the sphere what is left to lution, they make use of cheaper optics and they are not be done, in order to obtain a flat panorama, is projecting restricted to the projection geometry imposed by the lens. the spherical image onto a picture plane. This step is unfor- The geometry of single view point panoramas has long tunately not obvious – the surface of the sphere may not be been well understood [12, 21]. This has been used for mo- flattened onto a page without some form of distortion. The saicing of video sequences (e.g., [13, 20]) as well as for ob- objective of this paper is discussing the difficulties and op- taining super-resolution images (e.g., [6, 23]). By contrast portunities that are connected to the projection from view- when the point of view changes the mosaic is ‘impossible’ ing sphere to image plane. We first explore a number of al- unless the structure of the scene is very special.
    [Show full text]
  • CS 4204 Computer Graphics 3D Views and Projection
    CS 4204 Computer Graphics 3D views and projection Adapted from notes by Yong Cao 1 Overview of 3D rendering Modeling: * Topic we’ve already discussed • *Define object in local coordinates • *Place object in world coordinates (modeling transformation) Viewing: • Define camera parameters • Find object location in camera coordinates (viewing transformation) Projection: project object to the viewplane Clipping: clip object to the view volume *Viewport transformation *Rasterization: rasterize object Simple teapot demo 3D rendering pipeline Vertices as input Series of operations/transformations to obtain 2D vertices in screen coordinates These can then be rasterized 3D rendering pipeline We’ve already discussed: • Viewport transformation • 3D modeling transformations We’ll talk about remaining topics in reverse order: • 3D clipping (simple extension of 2D clipping) • 3D projection • 3D viewing Clipping: 3D Cohen-Sutherland Use 6-bit outcodes When needed, clip line segment against planes Viewing and Projection Camera Analogy: 1. Set up your tripod and point the camera at the scene (viewing transformation). 2. Arrange the scene to be photographed into the desired composition (modeling transformation). 3. Choose a camera lens or adjust the zoom (projection transformation). 4. Determine how large you want the final photograph to be - for example, you might want it enlarged (viewport transformation). Projection transformations Introduction to Projection Transformations Mapping: f : Rn Rm Projection: n > m Planar Projection: Projection on a plane.
    [Show full text]
  • Perspective Projection
    Transform 3D objects on to a 2D plane using projections 2 types of projections Perspective Parallel In parallel projection, coordinate positions are transformed to the view plane along parallel lines. In perspective projection, object position are transformed to the view plane along lines that converge to a point called projection reference point (center of projection) 2 Perspective Projection 3 Parallel Projection 4 PROJECTIONS PARALLEL PERSPECTIVE (parallel projectors) (converging projectors) One point Oblique Orthographic (one principal (projectors perpendicular (projectors not perpendicular to vanishing point) to view plane) view plane) Two point General (Two principal Multiview Axonometric vanishing point) (view plane parallel (view plane not parallel to Cavalier principal planes) to principal planes) Three point (Three principal Cabinet vanishing point) Isometric Dimetric Trimetric 5 Perspective v Parallel • Perspective: – visual effect is similar to human visual system... – has 'perspective foreshortening' • size of object varies inversely with distance from the center of projection. Projection of a distant object are smaller than the projection of objects of the same size that are closer to the projection plane. • Parallel: It preserves relative proportion of object. – less realistic view because of no foreshortening – however, parallel lines remain parallel. 6 Perspective Projections • Characteristics: • Center of Projection (CP) is a finite distance from object • Projectors are rays (i.e., non-parallel) • Vanishing points • Objects appear smaller as distance from CP (eye of observer) increases • Difficult to determine exact size and shape of object • Most realistic, difficult to execute 7 • When a 3D object is projected onto view plane using perspective transformation equations, any set of parallel lines in the object that are not parallel to the projection plane, converge at a vanishing point.
    [Show full text]
  • Anamorphosis: Optical Games with Perspective’S Playful Parent
    Anamorphosis: Optical games with Perspective's Playful Parent Ant´onioAra´ujo∗ Abstract We explore conical anamorphosis in several variations and discuss its various constructions, both physical and diagrammatic. While exploring its playful aspect as a form of optical illusion, we argue against the prevalent perception of anamorphosis as a mere amusing derivative of perspective and defend the exact opposite view|that perspective is the derived concept, consisting of plane anamorphosis under arbitrary limitations and ad-hoc alterations. We show how to define vanishing points in the context of anamorphosis in a way that is valid for all anamorphs of the same set. We make brief observations regarding curvilinear perspectives, binocular anamorphoses, and color anamorphoses. Keywords: conical anamorphosis, optical illusion, perspective, curvilinear perspective, cyclorama, panorama, D¨urermachine, color anamorphosis. Introduction It is a common fallacy to assume that something playful is surely shallow. Conversely, a lack of playfulness is often taken for depth. Consider the split between the common views on anamorphosis and perspective: perspective gets all the serious gigs; it's taught at school, works at the architect's firm. What does anamorphosis do? It plays parlour tricks! What a joker! It even has a rather awkward dictionary definition: Anamorphosis: A distorted projection or drawing which appears normal when viewed from a particular point or with a suitable mirror or lens. (Oxford English Dictionary) ∗This work was supported by FCT - Funda¸c~aopara a Ci^enciae a Tecnologia, projects UID/MAT/04561/2013, UID/Multi/04019/2013. Proceedings of Recreational Mathematics Colloquium v - G4G (Europe), pp. 71{86 72 Anamorphosis: Optical games.
    [Show full text]
  • Anamorphic Projection: Analogical/Digital Algorithms
    Nexus Netw J (2015) 17:253–285 DOI 10.1007/s00004-014-0225-5 RESEARCH Anamorphic Projection: Analogical/Digital Algorithms Francesco Di Paola • Pietro Pedone • Laura Inzerillo • Cettina Santagati Published online: 27 November 2014 Ó Kim Williams Books, Turin 2014 Abstract The study presents the first results of a wider research project dealing with the theme of ‘‘anamorphosis’’, a specific technique of geometric projection of a shape on a surface. Here we investigate how new digital techniques make it possible to simplify the anamorphic applications even in cases of projections on complex surfaces. After a short excursus of the most famous historical and contemporary applications, we propose several possible approaches for managing the geometry of anamorphic curves both in the field of descriptive geometry (by using interactive tools such as Cabrı` and GeoGebra) and during the complex surfaces realization process, from concept design to manufacture, through CNC systems (by adopting generative procedural algorithms elaborated in Grasshopper). Keywords Anamorphosis Anamorphic technique Descriptive geometry Architectural geometry Generative algorithms Free form surfaces F. Di Paola (&) Á L. Inzerillo Department of Architecture (Darch), University of Palermo, Viale delle Scienze, Edificio 8-scala F4, 90128 Palermo, Italy e-mail: [email protected] L. Inzerillo e-mail: [email protected] F. Di Paola Á L. Inzerillo Á C. Santagati Department of Communication, Interactive Graphics and Augmented Reality, IEMEST, Istituto Euro Mediterraneo di Scienza e Tecnologia, 90139 Palermo, Italy P. Pedone Polytechnic of Milan, Bulding-Architectural Engineering, EDA, 23900 Lecco, Italy e-mail: [email protected] C. Santagati Department of Architecture, University of Catania, 95125 Catania, Italy e-mail: [email protected] 254 F.
    [Show full text]
  • Constructing 3D Perspective Anamorphosis Via Surface Projection
    Bridges 2018 Conference Proceedings Constructing 3D Perspective Anamorphosis via Surface Projection Tiffany C. Inglis D2L, Waterloo, ON, Canada; [email protected] Abstract 3D perspective anamorphoses, as defined in this paper, are 3D objects that create anamorphic illusions when viewed from a particular perspective. We present an algorithm of constructing 3D perspective anamorphoses by projecting onto surfaces. Introduction An anamorphosis is an object that looks distorted unless viewed in a special way. The method of distortion characterizes two main categories of anamorphic illusions: perspective (viewed from a particular perspec- tive) and mirror (viewed through a mirror). The object of distortion also falls into two types: 2D images and 3D models. Figure 1 shows an example from each category. Odeith’s [3] and Orosz’s [4] work are both 2D anamorphoses since they are 2D drawings that “come to life” (either by appearing 3D or revealing hid- den images) when viewed from a certain angle or through a mirror. 3D anamorphoses include Hamaekers’s sculpture [5] depicting an impossible triangle with curved edges, and De Comite’s´ sculpture [1] also using curved edges to create the illusion of a polygonal structure in the spherical mirror. A 2D anamorphosis is essentially an image projected onto some surface either via perspective projection or mirror reflection. For simple surfaces and mirrors, the design can be drawn manually using distorted grids. With more complex inputs, dedicated software such as Anamorph Me! [2] can automatically apply the necessary distortions. An artist may also use a projector in combination with projection mapping software to directly project their designs onto surfaces with complex geometry.
    [Show full text]
  • From 3D World Into a 2D Screen
    CS488 From 3D world into a 2D screen Luc RENAMBOT 1 Transformations • We talked about 2D and 3D transformations and how those transformations affect objects in the scene • We discussed how polygons are usually formed into hierarchies of more meaningful objects • We discussed how fonts are handled 2 3D Graphics • We are going to talk about how we convert a set of polygons (object) in a 3D world into an image on a 2D screen 3 General 3D Concepts • Taking 2D objects and mapping onto a 2D screen is pretty straightforward • The window is the same plane as the 2D world • Now we are taking 3D objects and mapping them onto a 2D screen 4 General 3D Concepts • Here is where the advantage of separating the model world from its rendered image becomes more obvious • The easiest way to think about converting 3D world into 2D image is the way we do it in real life - with a camera 5 General 3D Concepts • Lets say we have an object in the real world (e.g. the Sears Tower.) The tower is a 3D object • You can move around the tower, on the ground, on the water, in the air, and take pictures of it, converting it to a 2D image • Depending on where you put the camera and the settings on the camera, and other factors such as light levels, you get different looking images 6 General 3D Concepts • In computer graphics, we have a synthetic camera taking still or moving pictures of a synthetic environment • While this synthetic camera gives you a much wider range of options than a real camera, you will find it is VERY easy to take a picture of nothing at all 7 Transformations
    [Show full text]
  • From 3D to 2D: Orthographic and Perspective Projection—Part 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 From 3D to 2D: Orthographic and Perspective Projection—Part 1 • History • Geometrical Constructions • Types of Projection • Projection in Computer Graphics Andries van Dam September 13, 2001 3D Viewing I 1/34 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 Drawing as Projection • A painting based on a mythical tale as told by Pliny the Elder: a Corinthian man traces the shadow of his departing lover detail from The Invention of Drawing, 1830: Karl Friedrich Schinkle (Mitchell p.1) Andries van Dam September 13, 2001 3D Viewing I 2/34 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 Early Examples of Projection • Plan view (orthographic projection) from Mesopotamia, 2150 BC is earliest known technical drawing in existence Carlbom Fig. 1-1 • Greek vases from late 6th century BC show perspective(!) • Vitruvius, a Roman architect, published specifications of plan and elevation drawings, and perspective. Illustrations for these writings have been lost Andries van Dam September 13, 2001 3D Viewing I 3/34 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 Most Striking Features of Linear Perspective • || lines converge (in 1, 2, or 3 axes) to a vanishing point • Objects farther away are more foreshortened (i.e., smaller) than closer ones • Example: perspective cube edges same size, with farther ones smaller parallel edges converging Andries van Dam September 13, 2001 3D Viewing I 4/34 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 Early Perspective
    [Show full text]
  • Three Dimensional Graphics: Projections and Transformations
    Lecture 1: Three Dimensional graphics: Projections and Transformations Device Independence We will start with a brief discussion of two dimensional drawing primitives. At the lowest level of an operating sys- tem we have device dependent graphics methods such as: SetPixel(XCoord,YCoord,Colour); DrawLine(xs,ys,xf,yf); which draw objects using pixel coordi- nates. However it is clearly desirable that we create any graphics application in a device independent way. If we can do this then we can re-size a picture, or transport it to a different operating sys- tem and it will fit exactly in the window where we place it. Many graphics APIs Figure 1: Normalisation transformation provide this facility, and it is a straight- forward matter to implement it using a world coordinate system. This defines the coordinate values to be applied to the window on the screen where the graphics image will be drawn. Typically it will use a method of the kind: SetWindowCoords(Wxmin,Wymin,Wxmax,Wymax); WXMin etc are real numbers whose units are application dependent. If the application is to produce a visuali- sation of a house then the units could be meters, and if it is to draw accurate molecular models the units will be µm. The application program uses drawing primitives that work in these units, and converts the numeric values to pixels just before the image is rendered on the screen. This makes it easy to transport it to other systems or to upgrade it when new graphics hardware becomes available. There may be other device characteristics that need to be accounted for to achieve complete device independence, for example aspect ratios.
    [Show full text]
  • Viewing in 3D Common Coordinate Systems
    Common Coordinate Viewing in 3D Systems (Chapt. 6 in FVD, Chapt. 12 in Hearn & Baker) • Object space – local to each object • World space – common to all objects • Eye space / Camera space – derived from view frustum • Screen space – indexed according to hardware attributes y Specifying the Viewing v Up Coordinates P u w • Viewing Coordinates system, [u, P 0 v, w], describes 3D objects with x z respect to a viewer. ane pl ew Vi • A viewing plane (projection plane) is set up perpendicular to • P =(x ,y ,z ) is a point where a 0 0 0 0 w and aligned with (u,v). camera is located. • P is a point to look-at. • To set a view plane we have to • N=(P -P)/|P -P| is the view-plane specify a view-plane normal 0 0 vector, N, and a view-up vector, normal vector. Up, (both, in world coordinates): • Up is the view up vector, whose projection onto the view-plane is directed up. • How to form Viewing How to form Viewing coordinate system coordinate system : Up N UpuN w ; u ; v wuu N N UpuN • The transformation, M, from world-coordinate into viewing- coordinates is: ªu u u 0ºª1 0 0 x º « x y z » 0 « » w N / || N || « v v v 0» 0 1 0 y0 M x y z « » «w w w 0»«0 0 1 z » « x y z »« 0 » First, normalize the look-at vector to form the w-axis ¬« 0 0 0 1¼»¬0 0 0 1 ¼ Create V perpendicular to U and W Create U perpendicular to Up and W V Up Up W W U U u UpuW V W U U |UpuW | Projections • Viewing 3D objects on a 2D display requires a mapping from 3D to 2D.
    [Show full text]