1 Computer Graphics Chapter 8 3D Transformations.

Slides:



Advertisements
Similar presentations
Computer Graphics Lecture 4 Geometry & Transformations.
Advertisements

Computer Graphics Lecture 8 Arbitrary Viewing II: More Projection, Clipping and Mathematics of 3D Viewing.
Three Dimensional Viewing
Three-Dimensional Viewing Sang Il Park Sejong University Lots of slides are stolen from Jehee Lee’s.
1 Computer Graphics Chapter 6 2D Transformations.
Camera Models A camera is a mapping between the 3D world and a 2D image The principal camera of interest is central projection.
Based on slides created by Edward Angel
Viewing and Projections
CS 325 Introduction to Computer Graphics 02 / 24 / 2010 Instructor: Michael Eckmann.
Projection Matrices Ed Angel
Lecture 3 – Transformation And Coordinate Systems
Viewing Doug James’ CG Slides, Rich Riesenfeld’s CG Slides, Shirley, Fundamentals of Computer Graphics, Chap 7 Wen-Chieh (Steve) Lin Institute of Multimedia.
4.1si31_2001 SI31 Advanced Computer Graphics AGR Lecture 4 Projection Clipping Viewport Transformation.
Computer Graphics with OpenGL 3e
OpenGL (II). How to Draw a 3-D object on Screen?
CS 4731: Computer Graphics Lecture 11: 3D Viewing Emmanuel Agu.
1 Chapter 5 Viewing. 2 Perspective Projection 3 Parallel Projection.
CHAPTER 7 Viewing and Transformations © 2008 Cengage Learning EMEA.
Projection Projection - the transformation of points from a coordinate system in n dimensions to a coordinate system in m dimensions where m
Introduction to 3D viewing 3D is just like taking a photograph!
12.1 Si23_03 SI23 Introduction to Computer Graphics Lecture 12 – 3D Graphics Transformation Pipeline: Projection and Clipping.
Computer Graphics (fall 2009)
Transformation & Projection Feng Yu Proseminar Computer Graphics :
1 Projection Matrices. 2 Objectives Derive the projection matrices used for standard OpenGL projections Introduce oblique projections Introduce projection.
CSE 681 Review: Transformations. CSE 681 Transformations Modeling transformations build complex models by positioning (transforming) simple components.
Transformations Jehee Lee Seoul National University.
Week 5 - Wednesday.  What did we talk about last time?  Project 2  Normal transforms  Euler angles  Quaternions.
CS559: Computer Graphics Lecture 9: Projection Li Zhang Spring 2008.
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.
1 Introduction to Computer Graphics with WebGL Ed Angel Professor Emeritus of Computer Science Founding Director, Arts, Research, Technology and Science.
Computer Graphics, KKU. Lecture 51 Transformations Given two frames in an affine space of dimension n, we can find a ( n+1 ) x ( n +1) matrix that.
CS 4731: Computer Graphics Lecture 13: Projection Emmanuel Agu.
CS 376 Introduction to Computer Graphics 02 / 23 / 2007 Instructor: Michael Eckmann.
CS 325 Introduction to Computer Graphics 02 / 22 / 2010 Instructor: Michael Eckmann.
CS 450: COMPUTER GRAPHICS PROJECTIONS SPRING 2015 DR. MICHAEL J. REALE.
CS 325 Introduction to Computer Graphics 02 / 26 / 2010 Instructor: Michael Eckmann.
OpenGL The Viewing Pipeline: Definition: a series of operations that are applied to the OpenGL matrices, in order to create a 2D representation from 3D.
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.
Computer Graphics 3D Transformations. Translation.
Review on Graphics Basics. Outline Polygon rendering pipeline Affine transformations Projective transformations Lighting and shading From vertices to.
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,
3D Transformation A 3D point (x,y,z) – x,y, and z coordinates
Taxonomy of Projections FVFHP Figure Taxonomy of Projections.
Viewing and Projection
Coordinate Systems Lecture 1 Fri, Sep 2, The Coordinate Systems The points we create are transformed through a series of coordinate systems before.
Ta: Ryan Freedman Sushma Kini Chi Zhou.  Pipeline  Clipping  Transformation, homogeneous coordinates  Lighting  Perspective  Viewing.
CS 376 Introduction to Computer Graphics 02 / 21 / 2007 Instructor: Michael Eckmann.
Jinxiang Chai CSCE441: Computer Graphics 3D Transformations 0.
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)
Viewing and Projection. The topics Interior parameters Projection type Field of view Clipping Frustum… Exterior parameters Camera position Camera orientation.
CS 551 / 645: Introductory Computer Graphics Viewing Transforms.
CS 325 Introduction to Computer Graphics 02 / 19 / 2010 Instructor: Michael Eckmann.
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
Computer Graphics Projections.
University of North Carolina at Greensboro
CSCE 441 Computer Graphics 3-D Viewing
CENG 477 Introduction to Computer Graphics
Three Dimensional Viewing
Projections and Hidden Surface Removal
Chap 3 Viewing Pipeline Reading:
Viewing (Projections)
컴퓨터 그래픽스를 위한 기하학적 기초 (Line Geometry for Computer Graphics)
Presentation transcript:

1 Computer Graphics Chapter 8 3D Transformations

[8]-2RM Z X Y (x,y,z) (x’,y’,z’) Initial Object Transformed Object Transformation in 3D space

[8]-3RM CartesianHomogeneous 3D Homogeneous Coordinates

[8]-4RM Translation Z X Y Offset Vector = (t x, t y, t z )

[8]-5RM Scaling About the Origin Z X Y Scale Factors = (s x, s y, s z )

[8]-6RM (x,y,z) (x’,y’,z’)  x y x y z Rotation About Z-axis

[8]-7RM (x,y,z) (x’,y’,z’)  y z x y z Rotation About X-axis

[8]-8RM (x,y,z) (x’,y’,z’)  z x x y z Rotation About Y-axis

[8]-9RM Rotation Matrices

[8]-10RM Y X Z Reflection About XY Plane

[8]-11RM Reflection about xy plane: Reflection about yz plane: Reflection about zx plane: Reflections

[8]-12RM A general invertible, linear, transformation 3D Affine Transformations

[8]-13RM Product of affine transformations is affine. Affine transformations preserve linearity of segments. Affine transformations preserve parallelism between lines. Affine transformations are invertible. Affine Transforms - Properties

[8]-14RM 3D Transformations - OpenGL

[8]-15RM 3D Viewing

[8]-16RM Planar Projections

[8]-17RM P P’ P (3D) P’ (2D) Plane of Projection Projector Center of Projection Object Point Projection Geometry

[8]-18RM Parallel and Perspective Parallel Projections:  The center of projection is at infinity.  The projectors are parallel to each other. Perspective Projections:  The center of projection is a finite point.  The projectors intersect at the center of projection.

[8]-19RM Orthographic Projection The lines of projection are parallel, and at the same time orthogonal to the plane of projection.

[8]-20RM Orthographic Projection The lines of projection are parallel, and at the same time orthogonal to the plane of projection.

[8]-21RM Orthographic Projection Orthographic Projection Matrix: Projection along z axis: Transformation:x’ = x y’ = y z-coordinate information is lost!

[8]-22RM Oblique Projection The lines of projection are parallel, but not orthogonal to the plane of projection.

[8]-23RM Oblique Projection Oblique Projection Matrix: Transformation:x’ = x+k 1 z y’ = y+k 2 z The z-coordinate value of the object point, leads to a shift of x, y coordinates of the projected point, proportional to z.

[8]-24RM Perspective Projection The projectors intersect at a Center of Projection C.

[8]-25RM Perspective Projection For convenience of deriving projection equations, we assume that the center of projection is at the origin. The object and the plane of projection are now on the negative z side. The distance D then refers to the z-coordinate of the object point (towards –z). The plane of projection has the equation z =  N.

[8]-26RM Perspective Projection Perspective Projection Matrix:

[8]-27RM Perspective Projection The z-coordinate value of the object point leads to proportional scaling along x, y directions. Projections of objects located closer to the center of projection O, appear to be larger in size compared to objects that are farther away from O.

[8]-28RM Perspective Transformation a, b are arbitrary constants. The last term z’ is referred to as the pseudo-depth. Perspective Transformation Matrix:

[8]-29RM Projections: Properties Projections map points from one space to another coordinate space of lower dimension, and hence involves loss of information. Projections are not invertible. All projection matrices are singular. All points on a projector map to the same point on the plane of projection.

[8]-30RM View Volumes A view volume refers to a region of interest in three-dimensional space which will be used to generate the display on the viewport. All points outside the view volume will not be displayed. The shape of the view volume depends on the projection used, and the limits specified by the user.

[8]-31RM View Volume - Orthographic Projn glOrtho(left, right, bottom, top, near, far);

[8]-32RM View Volume - Orthographic Projn glOrtho(left, right, bottom, top, near, far);

[8]-33RM View Volume - Perspective Projn glFrustum(left, right, bottom, top, near, far);

[8]-34RM View Volume - Perspective Projn gluPerspective(fovy, aspect, near, far);

[8]-35RM Canonical View Volumes The 3D object model is not actually clipped inside the projection view volume. The view volume is instead mapped to a canonical view volume (CVV) which is a cube that extends from  1 to +1 in each dimension, having center at the origin. The dimensions of the CVV facilitates a fast and efficient clipping.

[8]-36RM Mapping to CVV Orthographic: Perspective:

[8]-37RM