Projection.

Slides:



Advertisements
Similar presentations
Computer Graphics - Viewing -
Advertisements

Three Dimensional Viewing
Three-Dimensional Viewing Sang Il Park Sejong University Lots of slides are stolen from Jehee Lee’s.
1 Projection. 2 Model Transform Viewing Transform Modelview Matrix world coordinates Pipeline Review Focus of this lecture.
Perspective View (finite Center of Projection). Parallel View (Center of Projection at Infinity)
Classical Viewing CS4395: Computer Graphics 1 Mohan Sridharan Based on slides created by Edward Angel.
IT- 601: Computer Graphics Lecture-11 Mathematics of Projection Jesmin Akhter Lecturer,IIT Jahangirnagar University, Savar, Dhaka,Bangladesh.
1 Chapter 5 Viewing. 2 Perspective Projection 3 Parallel Projection.
Projection Projection - the transformation of points from a coordinate system in n dimensions to a coordinate system in m dimensions where m
Transformation & Projection Feng Yu Proseminar Computer Graphics :
1 2D Transformations 几何变换. 2 What is a transformation? A transformation is an operation that transforms or changes a shape (line, drawing etc.) There.
Chi-Cheng Lin, Winona State University CS430 Computer Graphics 3D Viewing and Projections.
Computer Graphics I, Fall 2010 Classical Viewing.
CS559: Computer Graphics Lecture 9: Projection Li Zhang Spring 2008.
1 Introduction to Computer Graphics with WebGL Ed Angel Professor Emeritus of Computer Science Founding Director, Arts, Research, Technology and Science.
Viewing Angel Angel: Interactive Computer Graphics5E © Addison-Wesley
1 E. Angel and D. Shreiner : Interactive Computer Graphics 6E © Addison-Wesley 2012 Classical Viewing Sai-Keung Wong ( 黃世強 ) Computer Science National.
1 Classical Viewing. 2 Objectives Introduce the classical views Compare and contrast image formation by computer with how images have been formed by architects,
C O M P U T E R G R A P H I C S Guoying Zhao 1 / 67 C O M P U T E R G R A P H I C S Guoying Zhao 1 / 67 Computer Graphics Three-Dimensional Graphics III.
Graphics Graphics Korea University cgvr.korea.ac.kr 3D Viewing 고려대학교 컴퓨터 그래픽스 연구실.
Computer Graphics Bing-Yu Chen National Taiwan University.
CAP 4703 Computer Graphic Methods Prof. Roy Levow Chapter 5.
Demetriou/Loizidou – ACSC330 – Chapter 5 Viewing Dr. Giorgos A. Demetriou Computer Science Frederick Institute of Technology.
Angel: Interactive Computer Graphics CSE 409: Computer Graphics Camera Transformations and Projection Acknowledgements: parts of information and pictures.
CS 325 Introduction to Computer Graphics 02 / 22 / 2010 Instructor: Michael Eckmann.
Basic Projections 2D to 3D
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.
CS5500 Computer Graphics March 12, 2007.
University of North Carolina at Greensboro
2003CS Hons RW778 Graphics1 Chapter 7: Three-Dimensional Viewing Chapter 5: Camera with parallel projection Chapter 5: Camera with parallel projection.
Graphics Graphics Korea University kucg.korea.ac.kr Viewing 고려대학교 컴퓨터 그래픽스 연구실.
Three-Dimensional Viewing
Three-Dimensional Viewing Hearn & Baker Chapter 7
12/24/2015 A.Aruna/Assistant professor/IT/SNSCE 1.
1 Angel: Interactive Computer Graphics 4E © Addison-Wesley 2005 Classical Viewing Ed Angel Professor of Computer Science, Electrical and Computer Engineering,
Projection.
Rendering Pipeline Fall, D Polygon Rendering Many applications use rendering of 3D polygons with direct illumination.
Classical Viewing Ed Angel Professor of Computer Science, Electrical and Computer Engineering, and Media Arts University of New Mexico.
1 PTT 105/3: Engineering Graphics. TAXONOMY OF PLANAR GEOMETRIC PROJECTIONS PTT 105/3: Engineering Graphics 2 Planar Geometric Projections Parallel Multiview.
CS 376 Introduction to Computer Graphics 02 / 21 / 2007 Instructor: Michael Eckmann.
RAC/RA Projection Types of Projection Simple Projections Generalized Projection.
Classical Viewing Ed Angel Professor of Computer Science, Electrical and Computer Engineering, and Media Arts University of New Mexico.
Viewing Angel Angel: Interactive Computer Graphics5E © Addison-Wesley
Section 2 Drafting Techniques and Skills
Viewing. Classical Viewing Viewing requires three basic elements - One or more objects - A viewer with a projection surface - Projectors that go from.
Projection. Conceptual model of 3D viewing process.
Computer Graphics Projections.
Viewing in 3D Lecture 11. Viewing in 3D2 u The 3D viewing process is inherently more complex than is the 2D viewing process. F In 2D, we simply specify.
PROJECTIONS PROJECTIONS 1. Transform 3D objects on to a 2D plane using projections 2 types of projections Perspective Parallel In parallel projection,
COMPUTER GRAPHICS 1/36 Viewing 1 Viewing: Types of Projections Computer Graphics.
Chapter 11 Three-Dimensional Geometric and Modeling Transformations
Three Dimensional Viewing
Rendering Pipeline Fall, 2015.
University of North Carolina at Greensboro
Projection Our 3-D scenes are all specified in 3-D world coordinates
3D Viewing cgvr.korea.ac.kr.
CSC461: Lecture 18 Classical Viewing
Unit 4 3D Viewing Pipeline Part - 2
Classical Viewing Ed Angel
Isaac Gang University of Mary Hardin-Baylor
Introduction to Computer Graphics with WebGL
Three Dimensional Viewing
Planar Geometric Projection Classes
3D Graphics.
Viewing (Projections)
Viewing (Projections)
PROJECTIONS KOYEL DATTA GUPTA.
University of New Mexico
Isaac Gang University of Mary Hardin-Baylor
Presentation transcript:

Projection

Projection

Projection Conceptual model of 3D viewing process

Projection In general, projections transform points in a coordinate system of dimension n into points in a coordinate system of dimension less than n. We shall limit ourselves to the projection from 3D to 2D. We will deal with planar geometric projections where: The projection is onto a plane rather than a curved surface The projectors are straight lines rather than curves

Projection key terms… Projection from 3D to 2D is defined by straight projection rays (projectors) emanating from the 'center of projection', passing through each point of the object, and intersecting the 'projection plane' to form a projection.

Planer Geometric Projection 2 types of projections perspective and parallel. Key factor is the center of projection. if distance to center of projection is finite : perspective if infinite : parallel Perspective projection Parallel projection

Perspective v Parallel visual effect is similar to human visual system... has 'perspective foreshortening' size of object varies inversely with distance from the center of projection. Parallel lines do not in general project to parallel lines angles only remain intact for faces parallel to projection plane.

Perspective v Parallel less realistic view because of no foreshortening however, parallel lines remain parallel. angles only remain intact for faces parallel to projection plane.

Perspective projection- anomalies Perspective foreshortening The farther an object is from COP the smaller it appears Perspective foreshortening

Perspective projection- anomalies Vanishing Points: Any set of parallel lines not parallel to the view plane appear to meet at some point. There are an infinite number of these, 1 for each of the infinite amount of directions line can be oriented Vanishing point

Perspective projection- anomalies View Confusion: Objects behind the center of projection are projected upside down and backward onto the view-plane Topological distortion: A line segment joining a point which lies in front of the viewer to a point in back of the viewer is projected to a broken line of infinite extent. P 1 3 P' C Y X Z 2 View Plane Plane containing Center of Projection (C)

Vanishing Point Vanishing Point COP View Plane

Vanishing Point If a set of lines are parallel to one of the three axes, the vanishing point is called an axis vanishing point (Principal Vanishing Point). There are at most 3 such points, corresponding to the number of axes cut by the projection plane One-point: One principle axis cut by projection plane One axis vanishing point Two-point: Two principle axes cut by projection plane Two axis vanishing points Three-point: Three principle axes cut by projection plane Three axis vanishing points

Vanishing Point

Vanishing Point One point perspective projection of a cube X and Y parallel lines do not converge

Vanishing Point

Vanishing Point Two-point perspective projection: This is often used in architectural, engineering and industrial design drawings. Three-point is used less frequently as it adds little extra realism to that offered by two-point perspective projection.

Vanishing Point H VPL VPR VP1 VP2 VP3

Projective Transformation Settings for perspective projection

Projective Transformation

Projective Transformation

Parallel projection 2 principle types: Orthographic : Oblique : orthographic and oblique. Orthographic : direction of projection = normal to the projection plane. Oblique : direction of projection != normal to the projection plane.

Orthographic projection Orthographic (or orthogonal) projections: front elevation, top-elevation and side-elevation. all have projection plane perpendicular to a principle axes. Useful because angle and distance measurements can be made... However, As only one face of an object is shown, it can be hard to create a mental image of the object, even when several view are available

Orthographic projection

Orthogonal Projection Matrix

Axonometric projection Axonometric Projections use projection planes that are not normal to a principal axis.On the basis of projection plane normal N = (dx, dy, dz) subclasses are: Isometric : | dx | = | dy | = | dz | i.e. N makes equal angles with all principal axes. Dimetric : | dx | = | dy | Trimetric : | dx | != | dy | != | dz |

Axonometric vs Perspective Axonometric projection shows several faces of an object at once like perspective projection. But the foreshortening is uniform rather than being related to the distance from the COP. Projection Plane Isometric proj

Oblique parallel projection Oblique parallel projections Objects can be visualized better then with orthographic projections Can measure distances, but not angles * Can only measure angles for faces of objects parallel to the plane 2 common oblique parallel projections: Cavalier and Cabinet

Oblique parallel projection Projection Plane Normal Projector Projection Plane

Oblique parallel projection Cavalier: The direction of the projection makes a 45 degree angle with the projection plane. There is no foreshortening

Oblique parallel projection Cabinet: The direction of the projection makes a 63.4 degree angle with the projection plane. This results in foreshortening of the z axis, and provides a more “realistic” view

Oblique parallel projection Cavalier, cabinet and orthogonal projections can all be specified in terms of (α, β) or (α, λ) since tan(β) = 1/λ α β P=(0, 0, 1) P׳(λ cos(α), λ sin(α),0) λ cos(α) λ sin(α) λ

Oblique parallel projection Cavalier projection a = 0 - 360 l=0.5 b = 63.4 Cabinet projection a = 0 – 360 l=0 b = 90 Orthogonal projection

Oblique parallel projection PP‘ = (λ cos(α), λ sin(α),-1) = DOP Proj(P) = (λ cos(α), λ sin(α),0) Generally multiply by z and allow for (non-zero) x and y x ‘ = x + z lcos a y‘ = y + z lsin a

Generalized Projection Matrix

Generalized Projection Matrix

Generalized Projection Matrix

Generalized Projection Matrix

Generalized Projection Matrix

Taxonomy of Projection

OpenGL’s Perspective Specification y field-of-view / fovy aspect ratio near and far clipping planes viewing frustum gluPerspective(fovy, aspect, near, far) glFrustum(left, right, bottom, top, near, far)

Perspective without Depth The depth information is lost as the last two components are same But dept information of the projected points is essential for hidden surface removal and other purposes like blending, shading etc.

Perspective without Depth For ß < 0, z’ is a monotonically increasing function of depth.

Canonical View Volume

Canonical View Volume There is a reversal of the z- coordinates, in the sense that before the transformation, points further from the viewer have smaller z- coordinates

Perspective Matrix The matrix to perform perspective transformation:

Perspective Matrix

Perspective Matrix

Perspective Matrix

Perspective Matrix

Perspective Matrix The matrix to perform perspective transformation:

Taxonomy of projection

Generalized Projection Using the origin as the center of projection, derive the perspective transformation onto the plane passing through the point R0(x0, y0, z0) and having the normal vector N = n1I + n2J + n3K. x y z P(x, y, z) P'(x', y', z') N = n1I + n2J + n3K R0=x0 ,y0, z0 O

Generalized Projection x y z P(x, y, z) P'(x', y', z') N = n1I + n2J + n3K R0=x0 ,y0, z0 P'O = α PO x' = αx, y' = αy, z ' = αz N. R0P' = 0 n1x ' + n2y ' + n3z ' =n1x0 + n2y0 + n3z0 = d0 O

Generalized Projection Derive the general perspective transformation onto a plane with reference point R0 and normal vector N and using C(a,b,c) as the center of projection. x y z P(x, y, z) P'(x', y', z') N = n1I + n2J + n3K R0=x0 ,y0, z0 C

Generalized Projection x y z P(x, y, z) P'(x', y', z') N = n1I + n2J + n3K R0=x0 ,y0, z0 C P'C = α PC x' = α(x-a) + a n1x' + n2y' + n3z‘ = d0 d = (n1x0 + n2y0 + n3z0) – (n1a + n2b + n3c) = d0 – d1

Generalized Projection Follow the steps – Translate so that C lies at the origin Per Translate back

Generalized Projection Find (a) the vanishing points for a given perspective transformation in the direction given by a vector U (b) principal vanishing point. Family of parallel lines having the direction U(u1,u2,u3) can be written in parametric form as x = u1t+p, y = u2t+q, z = u3t+r here (p, q, r) is any point on the line Let, proj(x,y,z,1) = (x‘, y‘, z‘, h) x' = (d+an1)(u1t+p) + an2(u2t+q) + an3(u3t+r) – ad0 y' = bn1(u1t+p) + (d+bn2)(u2t+q) + bn3(u3t+r) – bd0 z' = cn1(u1t+p) + cn2(u2t+q) + (d+cn3)(u3t+r) – cd0 h = n1(u1t+p) + n2(u2t+q) + n3(u3t+r) – d1

Generalized Projection The vanishing point (xv, yv, zv) is obtained when t=α xu = (x‘/h) at t= α = a + (du1/k) yu = b + (du2/k) zu = c + (du3/k) k = N.U = n1u1 + n2u2 + n3u3 If k=0 then ? Principal vanishing point when U = I xu = a + d / n1, yu = b, zu = c, U = J U = k

Ref. FV: p. 229-237, 253-258 Sch: prob. 7.1 – 7.15 Perspective Proj.pdf