Computer Graphics Projections.

Slides:



Advertisements
Similar presentations
Computer Graphics - Viewing -
Advertisements

GR2 Advanced Computer Graphics AGR
Three Dimensional Viewing
1 Computer Graphics Chapter 8 3D Transformations.
Projection.
Now Playing: Coulibaly Amadou & Mariam from Dimanche a Bamako Released August 2, 2005.
University of British Columbia CPSC 314 Computer Graphics Jan-Apr 2008 Tamara Munzner Viewing/Projections I.
4.1si31_2001 SI31 Advanced Computer Graphics AGR Lecture 4 Projection Clipping Viewport Transformation.
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.
1 Chapter 5 Viewing. 2 Perspective Projection 3 Parallel Projection.
1 of 23 New Lecture And Lab Information Lectures: –Thursday 12:00 – 13:00 (room tba) –Friday 15:00 – 16:00 (A28) Labs: –Wednesday 10:00 – 11:00 (A305)
Rendering Pipeline Aaron Bloomfield CS 445: Introduction to Graphics Fall 2006 (Slide set originally by Greg Humphreys)
Projection Projection - the transformation of points from a coordinate system in n dimensions to a coordinate system in m dimensions where m
12.1 Si23_03 SI23 Introduction to Computer Graphics Lecture 12 – 3D Graphics Transformation Pipeline: Projection and Clipping.
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.
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 고려대학교 컴퓨터 그래픽스 연구실.
CS-378: Game Technology Lecture #2.1: Projection Prof. Okan Arikan University of Texas, Austin Thanks to James O’Brien, Steve Chenney, Zoran Popovic, Jessica.
Computer Graphics Bing-Yu Chen National Taiwan University.
3D Viewing ( From 3D to 2D) Some of the material in these slides have been adapted from the lecture notes of Prof. Tao Ju from Washington University in.
CAP4730: Computational Structures in Computer Graphics 3D Transformations.
CS 325 Introduction to Computer Graphics 02 / 22 / 2010 Instructor: Michael Eckmann.
Basic Projections 2D to 3D
CS5500 Computer Graphics March 12, 2007.
University of North Carolina at Greensboro
Jinxiang Chai CSCE 441 Computer Graphics 3-D Viewing 0.
Three-Dimensional Viewing
Foundations of Computer Graphics (Spring 2012) CS 184, Lecture 5: Viewing
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.
Taxonomy of Projections FVFHP Figure Taxonomy of Projections.
Projections Angel: Interactive Computer Graphics.
Viewing and Projection
1 PTT 105/3: Engineering Graphics. TAXONOMY OF PLANAR GEOMETRIC PROJECTIONS PTT 105/3: Engineering Graphics 2 Planar Geometric Projections Parallel Multiview.
CS559: Computer Graphics Lecture 9: 3D Transformation and Projection Li Zhang Spring 2010 Most slides borrowed from Yungyu ChuangYungyu Chuang.
CS 376 Introduction to Computer Graphics 02 / 21 / 2007 Instructor: Michael Eckmann.
RAC/RA Projection Types of Projection Simple Projections Generalized Projection.
Viewing Angel Angel: Interactive Computer Graphics5E © Addison-Wesley
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.
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
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
Viewing in 3D Chapter 6.
Unit 4 3D Viewing Pipeline Part - 2
Classical Viewing Ed Angel
Three Dimensional Viewing
3D Graphics.
Viewing (Projections)
Viewing (Projections)
PROJECTIONS KOYEL DATTA GUPTA.
Presentation transcript:

Computer Graphics Projections

3D Viewing Inherently more complex than 2D case. Most display devices are only 2D Need to use a projection to transform 3D object or scene to 2D display device.

Jetty at Margate England, 1898. http://brightbytes.com/cosite/collection2.html (Jack and Beverly Wilgus)

Graphics Cameras real pinhole camera: image inverted eye point image plane computer graphics camera: convenient equivalent stand at p and look through hole. anything in cone visible shrink hole to a point, cone collapses to line (ray) eye point center of projection image plane

Transformations Screen coordinates Local coordinates Projection matrix World to camera matrix Local to world matrix 28/04/2017

Projection: Mapping 3-D to 2-D Scene models are in 3-D space and (but) images are 2-D so need some way of projecting 3-D to 2-D Recall, “fundamental challenge” Planar Projection Basic approach: Define a plane in 3-D space image plane (or film plane) Project scene onto plane Map to window viewport Need to address two basic issues: how to define plane how to define mapping onto plane

Projections Transforms points in a coordinate system of dimension n into points in one of less than n (ie 3D to 2D) Projectors emanate from a centre of projection, pass through every point in the object and intersect a projection surface to form the 2D projection.

Projection: Essential Definitions (quick look) Projectors View plane (or film plane) Direction of projection Center of projection Eye, viewer projection reference point

Planar Geometric Projections Standard projections project onto a plane (the view plane) – as we’ve seen Nonplanar projections needed for applications such as map construction But how big is Greenland?

View Projection We want to create a picture of the scene viewed from the camera Two sorts of projection Parallel projection Perspective projection

Moving COP to Infinity as COP moves away, lines approach parallel when COP at infinity, orthographic view

Projections. Two classes of projections : Perspective. Parallel. Projections are core to the course. Centre of Projection. B B B Centre of Projection at infinity B Perspective

Perspective projection is useful for ‘non technical’ communications Perspective renderings for marketing, etc. are readily obtained with computer-aided drawing (CAD) systems

Perspective Projections. Defined by projection plane and centre of projection. Visual effect is termed perspective foreshortening. The size of the projection of an object varies inversely with distance from the centre of projection. Similar to a camera - Looks realistic ! Not useful for metric information Parallel lines do not in general project as parallel. Angles only preserved on faces parallel to the projection plane. Distances not preserved

Remember The Big Idea

Perspective Projections A set of lines not parallel to the projection plane converge at a vanishing point. Can be thought of in 3D as the projection of a point at infinity. Homogeneous coordinate is 0 (x,y,0)

1-Point Projection Projection plane cuts 1 axis only.

One-point Perspective One principal face is parallel to the projection plane

1-Point Perspective A painting (The Piazza of St. Mark, Venice) done by Canaletto in 1735-45 in one-point perspective

Two-point Perspective One principal direction (i.e. axis) is parallel to the projection plane

2-Point Perspective y z x Projection plane

2-Point Perspective Painting in two point perspective by Edward Hopper The Mansard Roof 1923 (240 Kb); Watercolor on paper, 13 3/4 x 19 inches; The Brooklyn Museum, New York

Three-point Perspective Nothing parallel to the projection plane Usually used when looking up at or down on buildings

3-Point Perspective Generally held to add little beyond 2-point perspective. A painting (City Night, 1926) by Georgia O'Keefe, that is approximately in three-point perspective. y z x Projection plane

3 points

Perspective Projection – Simplest Case Centre of projection at the origin, Projection plane at z=d. Projection Plane. y P(x,y,z) x Pp(xp,yp,d) z d

Projection Calculations x axis y axis z axis P=(x, y, z) (xprp, yprp, zprp) (xp, yp, zp) View Plane

Review: Basic Perspective Projection similar triangles y P(x,y,z) P(x’,y’,z’) z z’=d homogeneous coords

Perspective Projection Important to understand the assumptions we made to derive this.

Perspective Projection

Types Of Projections For anyone who did engineering or technical drawing

Parallel Projections Specified by a direction to the centre of projection, rather than a point. Centre of projection at infinity. Orthographic The normal to the projection plane is the same as the direction to the centre of projection. Oblique Directions are different.

Orthographic Projections Most common orthographic Projection : Front-elevation, Side-elevation, Plan-elevation. Angle of projection parallel to principal axis; projection plane is perpendicular to axis. Commonly used in technical drawings

Orthographic Projection Orthographic Projection onto a plane at z = 0. xp = x , yp = y , z = 0.

Isometric Projection Projection plane normal makes equal angles with each axis. i.e normal is (dx,dy,dz), |dx| = |dy|=|dz| Only 8 directions that satisfy this condition.

Isometric Projection All 3 axes equally foreshortened z y Projection Plane 120º All 3 axes equally foreshortened measurements can be made Hence the name iso-metric Normal

Orthographic Derivation scale, translate, reflect for new coord sys

Orthographic Derivation scale, translate, reflect for new coord sys

Orthographic Derivation scale, translate, reflect for new coord sys

Orthographic Derivation scale, translate, reflect for new coord sys

Orthographic OpenGL glMatrixMode(GL_PROJECTION); glLoadIdentity(); glOrtho(left,right,bot,top,near,far);

Isometric Projections Isometric projections have been used in computer games from the very early days of the industry up to today Q*Bert Sim City Virtual Magic Kingdom

Oblique projections. Projection plane normal differs from the direction of projection. Usually the projection plane is normal to a principal axis. Projection of a face parallel to this plane allows measurement of angles and distance. Other faces can measure distance, but not angles. Frequently used in textbooks : easy to draw !

Oblique Projection Direction of projection is not perpendicular to the viewing plane Most general parallel projection Is this possible with a normal camera?

Oblique projection Normal Parallel to x axis y x Projection Plane z

Geometry of Oblique Projections Point P=(0,0,1) maps to: P’=(l.cosa, l.sina, 0) on xy plane, and P(x,y,z) onto P’(xp,yp,0) and

Orthographic Examples How would you map an arbitrary bounding volume (nearxyz, farxyz) into the volume defined by (-1, -1, -1) and (1, 1, 1)? (1) Scale and translate. First translate the center of AABB to 0, 0, 0; then scale by 2 / (near - far)

Quiz I sat in the car, and realized the side mirror is 0.4m on my right and 0.3m in my front I started my car and drove 5m forward, turned 30 degrees to right, moved 5m forward again, and turned 45 degrees to the right, and stopped What is the position of the side mirror now, relative to where I was sitting in the beginning?