Projections Angel: Interactive Computer Graphics.

Slides:



Advertisements
Similar presentations
GR2 Advanced Computer Graphics AGR
Advertisements

Three Dimensional Viewing
Projection.
1 Projection. 2 Model Transform Viewing Transform Modelview Matrix world coordinates Pipeline Review Focus of this lecture.
Viewing Transformations
Classical Viewing CS4395: Computer Graphics 1 Mohan Sridharan Based on slides created by Edward Angel.
3D Concepts UNIT 3. 3-D Coordinate Spaces Remember what we mean by a 3-D coordinate space x axis y axis z axis P y z x Right-Hand Reference System.
IT- 601: Computer Graphics Lecture-11 Mathematics of Projection Jesmin Akhter Lecturer,IIT Jahangirnagar University, Savar, Dhaka,Bangladesh.
Rendering Pipeline Aaron Bloomfield CS 445: Introduction to Graphics Fall 2006 (Slide set originally by Greg Humphreys)
04 – Geometric Transformations Overview Geometric Primitives –Points, Lines, Planes 2D Geometric Transformations –Translation, Rotation, Scaling, Affine,
Transformations Aaron Bloomfield CS 445: Introduction to Graphics
Viewing and Projections
UBI 516 Advanced Computer Graphics Three Dimensional Viewing
Advanced Computer Graphics Three Dimensional Viewing
Transformation & Projection Feng Yu Proseminar Computer Graphics :
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 Classical Viewing. 2 Objectives Introduce the classical views Compare and contrast image formation by computer with how images have been formed by architects,
Graphics Graphics Korea University cgvr.korea.ac.kr 3D Viewing 고려대학교 컴퓨터 그래픽스 연구실.
Computer Graphics Bing-Yu Chen National Taiwan University.
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.
CS5500 Computer Graphics March 12, 2007.
3D Polygon Rendering Pipeline 원본 – ( Thomas Funkhouser (Princeton.
CS 445 / 645 Introduction to Computer Graphics Lecture 10 Camera Models Lecture 10 Camera Models.
Jinxiang Chai CSCE 441 Computer Graphics 3-D Viewing 0.
12/24/2015 A.Aruna/Assistant professor/IT/SNSCE 1.
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.
Taxonomy of Projections FVFHP Figure Taxonomy of Projections.
Transformations: Projection CS 445/645 Introduction to Computer Graphics David Luebke, Spring 2003.
Viewing and Projection
CS552: Computer Graphics Lecture 11: Orthographic Projection.
CS559: Computer Graphics Lecture 9: 3D Transformation and Projection Li Zhang Spring 2010 Most slides borrowed from Yungyu ChuangYungyu Chuang.
CS-321 Dr. Mark L. Hornick 1 Three-Dimensional Graphics Problem How can you effectively display 3-D information on a 2-D display?
Viewing and Projection. The topics Interior parameters Projection type Field of view Clipping Frustum… Exterior parameters Camera position Camera orientation.
RAC/RA Projection Types of Projection Simple Projections Generalized Projection.
CS 551 / 645: Introductory Computer Graphics Viewing Transforms.
Viewing. Classical Viewing Viewing requires three basic elements - One or more objects - A viewer with a projection surface - Projectors that go from.
Computer Graphics Lecture 19 PROJECTIONS I Taqdees A. Siddiqi
Outline 3D Viewing Required readings: HB 10-1 to 10-10
Projection. Conceptual model of 3D viewing process.
Computer Graphics Projections.
PROJECTIONS PROJECTIONS 1. Transform 3D objects on to a 2D plane using projections 2 types of projections Perspective Parallel In parallel projection,
A Photograph of two papers The Model: 2 papers – 8cm x 8cm and 5cm x 5cm The Camera – Simple pinhole – No focusing capability The Scene – Arrangements.
Chapter 11 Three-Dimensional Geometric and Modeling Transformations
Viewing Viewing and viewing space (camera space)
Rendering Pipeline Fall, 2015.
PERSPECTIVE PROJECTION…...
Projection Our 3-D scenes are all specified in 3-D world coordinates
3D Viewing cgvr.korea.ac.kr.
Rendering Pipeline Aaron Bloomfield CS 445: Introduction to Graphics
CSCE 441 Computer Graphics 3-D Viewing
CSC461: Lecture 18 Classical Viewing
Classical Viewing Ed Angel
A Photograph of two papers
Isaac Gang University of Mary Hardin-Baylor
Introduction to Computer Graphics with WebGL
Three Dimensional Viewing
University of British Columbia CPSC 314 Computer Graphics Jan-Apr 2016
Perspective Transformation
3D Graphics.
Viewing (Projections)
Viewing (Projections)
PROJECTIONS KOYEL DATTA GUPTA.
University of New Mexico
Isaac Gang University of Mary Hardin-Baylor
Presentation 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