Transformation & Projection Feng Yu Proseminar Computer Graphics :

Slides:



Advertisements
Similar presentations
Computer Graphics - Viewing -
Advertisements

Computer Graphics Lecture 4 Geometry & Transformations.
Three Dimensional Viewing
1 Computer Graphics Chapter 8 3D Transformations.
Projection.
1 View Shandong University Software College Instructor: Zhou Yuanfeng
Transformations Objectives Understand how transformations work in 2D and 3D Understand the concept of homogenous coordinate system Understand scene graphs.
Now Playing: Coulibaly Amadou & Mariam from Dimanche a Bamako Released August 2, 2005.
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.
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.
1 Chapter 5 Viewing. 2 Perspective Projection 3 Parallel Projection.
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 E. Angel and D. Shreiner : Interactive Computer Graphics 6E © Addison-Wesley 2012 Classical Viewing Sai-Keung Wong ( 黃世強 ) Computer Science National.
Chapter 5 Viewing.
1 Classical Viewing. 2 Objectives Introduce the classical views Compare and contrast image formation by computer with how images have been formed by architects,
Geometric Transformation Graphics is at the core of any CAD/CAM system to produce the functionality and interactivity of the system. Some are: geometric.
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.
CS 325 Introduction to Computer Graphics 02 / 22 / 2010 Instructor: Michael Eckmann.
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.
Geometric Transformations Hearn & Baker Chapter 5 Some slides are taken from Robert Thomsons notes.
Review on Graphics Basics. Outline Polygon rendering pipeline Affine transformations Projective transformations Lighting and shading From vertices to.
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.
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.
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.
2D Transformation Homogenous Coordinates Scale/Rotate/Reflect/Shear: X’ = XT Translate: X’ = X + T Multiple values for the same point e.g., (2, 3, 6)
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
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 09 Fasih ur Rehman. Last Class Viewing – Perspectives – Projections.
Computer Graphics Lecture 19 PROJECTIONS I Taqdees A. Siddiqi
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,
3D Viewing and Clipping Ming Ouhyoung 歐陽明 Professor Dept. of CSIE and GINM NTU.
Chapter 11 Three-Dimensional Geometric and Modeling Transformations
University of North Carolina at Greensboro
Geometric Transformations Hearn & Baker Chapter 5
PERSPECTIVE PROJECTION…...
Projection Our 3-D scenes are all specified in 3-D world coordinates
3D Viewing cgvr.korea.ac.kr.
CSCE 441 Computer Graphics 3-D Viewing
CSC461: Lecture 18 Classical Viewing
Lecture 2 Transformations
Classical Viewing Ed Angel
Isaac Gang University of Mary Hardin-Baylor
Introduction to Computer Graphics with WebGL
Three Dimensional Viewing
Computer Graphics Imaging
3D Graphics.
Viewing (Projections)
Viewing (Projections)
PROJECTIONS KOYEL DATTA GUPTA.
University of New Mexico
Isaac Gang University of Mary Hardin-Baylor
Presentation transcript:

Transformation & Projection Feng Yu Proseminar Computer Graphics :

Transformations What is a transformation? What is a transformation? What kind of transformations are there? What kind of transformations are there? How can we compute them? How can we compute them?

Transformation : 2D Transformations 2D Transformations Homogeneous Coordinates and Matrix Representation of 2D Transformations Homogeneous Coordinates and Matrix Representation of 2D Transformations Matrix Representation of 3D Transformations Matrix Representation of 3D Transformations Transformations as a Change in Coordinate System Transformations as a Change in Coordinate System

2D Translations. P P’

2D Scaling from the origin. P P’

2D Rotation about the origin. y x r r P’(x’,y’) P(x,y) 

2D Rotation about the origin. y x r r P’(x’,y’) P(x,y)   y x

2D Rotation about the origin. Substituting for r : Given us:

2D Rotation about the origin. Rewriting in matrix form gives us :

Transformations. Translation. Translation. P=T + PP=T + P Scale Scale P=S  PP=S  P Rotation Rotation P=R  PP=R  P We would like all transformations to be multiplications so we can concatenate them  express points in homogenous coordinates. We would like all transformations to be multiplications so we can concatenate them  express points in homogenous coordinates.

Homogeneous coordinates Add an extra coordinate, W, to a point. Add an extra coordinate, W, to a point. P(x,y,W).P(x,y,W). Two sets of homogeneous coordinates represent the same point if they are a multiple of each other. Two sets of homogeneous coordinates represent the same point if they are a multiple of each other. (2,5,3) and (4,10,6) represent the same point.(2,5,3) and (4,10,6) represent the same point. At least one component must be non-zero  (0,0,0) is not allowed. At least one component must be non-zero  (0,0,0) is not allowed. If W  0, divide by it to get Cartesian coordinates of point (x/W,y/W,1). If W  0, divide by it to get Cartesian coordinates of point (x/W,y/W,1). If W=0, point is said to be at infinity. If W=0, point is said to be at infinity.

Homogeneous coordinates If we represent (x,y,W) in 3-space, all triples representing the same point describe a line passing through the origin. If we represent (x,y,W) in 3-space, all triples representing the same point describe a line passing through the origin. If we homogenize the point, we get a point of form (x,y,1) If we homogenize the point, we get a point of form (x,y,1) homogenised points form a plane at W=1.homogenised points form a plane at W=1. P X Y W W=1 plane

Translations in homogenised coordinates Transformation matrices for 2D translation are now 3x3. Transformation matrices for 2D translation are now 3x3.

Concatenation. We perform 2 translations on the same point: We perform 2 translations on the same point:

Concatenation. Matrix product is variously referred to as compounding, concatenation, or composition. This single matrix is called the Coordinate Transformation Matrix or CTM.

Homogeneous form of scale. Recall the (x,y) form of Scale : In homogeneous coordinates :

Concatenation of scales.

Homogeneous form of rotation.

3D Transformations. Use homogeneous coordinates, just as in 2D case. Use homogeneous coordinates, just as in 2D case. Transformations are now 4x4 matrices. Transformations are now 4x4 matrices. We will use a right-handed (world) coordinate system - ( z out of page ). We will use a right-handed (world) coordinate system - ( z out of page ). z (out of page) y x Note: Convenient to think of display as Being left-handed !! ( z into the screen )

Translation in 3D. Simple extension to the 3D case:

Scale in 3D. Simple extension to the 3D case:

Rotation in 3D Need to specify which axis the rotation is about. Need to specify which axis the rotation is about. z-axis rotation is the same as the 2D case. z-axis rotation is the same as the 2D case.

Rotation in 3D For rotation about the x and y axes: For rotation about the x and y axes:

Transformations of coordinate systems.

Transform Left-Right, Right-Left Transforms between world coordinates and viewing coordinates. That is: between a right-handed set and a left- handed set.

Projections Perspective Projection Perspective Projection Parallel Projection Parallel Projection

Planar Geometric Projections Standard projections project onto a plane Standard projections project onto a plane Projectors are lines that either Projectors are lines that either converge at a center of projectionconverge at a center of projection are parallelare parallel Such projections preserve lines Such projections preserve lines but not necessarily anglesbut not necessarily angles Nonplanar projections are needed for applications such as map construction Nonplanar projections are needed for applications such as map construction

Perspective Projection

Parallel Projection

Taxonomy of Planar Geometric Projections paralle l perspective axonometric multiview orthographic oblique isometricdimetrictrimetric 2 point1 point3 point planar geometric projections

Orthographic Projection Projectors are orthogonal to projection plane

Multiview Orthographic Projection Projection plane parallel to principal face Projection plane parallel to principal face Usually form front, top, side views Usually form front, top, side views isometric (not multiview orthographic view) front side top in CAD and architecture, we often display three multiviews plus isometric

Advantages and Disadvantages Preserves both distances and angles Preserves both distances and angles Shapes preservedShapes preserved Can be used for measurementsCan be used for measurements Building plans Building plans Manuals Manuals Cannot see what object really looks like because many surfaces hidden from view Cannot see what object really looks like because many surfaces hidden from view Often we add the isometricOften we add the isometric

Oblique Projection Arbitrary relationship between projectors and projection plane

Advantages and Disadvantages Can pick the angles to emphasize a particular face Can pick the angles to emphasize a particular face Architecture: plan oblique, elevation obliqueArchitecture: plan oblique, elevation oblique Angles in faces parallel to projection plane are preserved while we can still see “around” side Angles in faces parallel to projection plane are preserved while we can still see “around” side In physical world, cannot create with simple camera; possible with bellows camera or special lens (architectural) In physical world, cannot create with simple camera; possible with bellows camera or special lens (architectural)

Perspective Projection Projectors coverge at center of projection

Vanishing Points Parallel lines (not parallel to the projection plan) on the object converge at a single point in the projection (the vanishing point) Parallel lines (not parallel to the projection plan) on the object converge at a single point in the projection (the vanishing point) Drawing simple perspectives by hand uses these vanishing point(s) Drawing simple perspectives by hand uses these vanishing point(s) vanishing point

One-Point Perspective One principal face parallel to projection plane One principal face parallel to projection plane One vanishing point for cube One vanishing point for cube

Two-Point Perspective On principal direction parallel to projection plane On principal direction parallel to projection plane Two vanishing points for cube Two vanishing points for cube

Advantages and Disadvantages Objects further from viewer are projected smaller than the same sized objects closer to the viewer (diminution) Objects further from viewer are projected smaller than the same sized objects closer to the viewer (diminution) Looks realisticLooks realistic Equal distances along a line are not projected into equal distances (nonuniform foreshortening) Equal distances along a line are not projected into equal distances (nonuniform foreshortening) Angles preserved only in planes parallel to the projection plane Angles preserved only in planes parallel to the projection plane More difficult to construct by hand than parallel projections (but not more difficult by computer) More difficult to construct by hand than parallel projections (but not more difficult by computer)

END Thank you for your attentions