2003CS Hons RW778 Graphics1 Chapter 5: Transforming Objects 5.2 Introduction to Transformations 5.2 Introduction to Transformations –Affine transformations.

Slides:



Advertisements
Similar presentations
Transformations Ed Angel Professor Emeritus of Computer Science
Advertisements

Computer Graphics Lecture 4 Geometry & Transformations.
University of North Carolina at Greensboro
1 Computer Graphics Chapter 6 2D Transformations.
CMPE 466 COMPUTER GRAPHICS
1 Geometrical Transformation 2 Outline General Transform 3D Objects Quaternion & 3D Track Ball.
2D Geometric Transformations
University of North Carolina at Greensboro
CS5500 Computer Graphics March 22, Angel: Interactive Computer Graphics 3E © Addison-Wesley 2002 Coordinate-Free Geometry When we learned simple.
1 CSCE 441 Computer Graphics: 2D Transformations Jinxiang Chai.
3-D Geometry.
©College of Computer and Information Science, Northeastern UniversityJune 26, CS U540 Computer Graphics Prof. Harriet Fell Spring 2009 Lecture 11.
Transformations I CS5600Computer Graphics by Rich Riesenfeld 27 February 2002 Lecture Set 5.
Transformations. 2 Angel: Interactive Computer Graphics 3E © Addison-Wesley 2002 Coordinate-Free Geometry When we learned simple geometry, most of us.
Representation CS4395: Computer Graphics 1 Mohan Sridharan Based on slides created by Edward Angel.
Transformations CS4395: Computer Graphics 1 Mohan Sridharan Based on slides created by Edward Angel.
CS 4731: Computer Graphics Lecture 8: 3D Affine transforms Emmanuel Agu.
Graphics Programming Graphics Programming: Transformations.
2D Transformations Unit - 3. Why Transformations? In graphics, once we have an object described, transformations are used to move that object, scale it.
Geometric Objects and Transformations Geometric Entities Representation vs. Reference System Geometric ADT (Abstract Data Types)
COS 397 Computer Graphics Svetla Boytcheva AUBG, Spring 2013.
©College of Computer and Information Science, Northeastern UniversitySeptember 9, CS 4300 Computer Graphics Prof. Harriet Fell Fall 2011 Lecture.
Transformations Aaron Bloomfield CS 445: Introduction to Graphics
Transformations of Objects CVG lab. Introduction  Affine transformations : Affine transformations are a fundamental cornerstone of computer graphics.
CS 480/680 Computer Graphics Representation Dr. Frederick C Harris, Jr. Fall 2012.
Geometric Transformation. So far…. We have been discussing the basic elements of geometric programming. We have discussed points, vectors and their operations.
1 Introduction to Computer Graphics with WebGL Ed Angel Professor Emeritus of Computer Science Founding Director, Arts, Research, Technology and Science.
1 Introduction to Computer Graphics with WebGL Ed Angel Professor Emeritus of Computer Science Founding Director, Arts, Research, Technology and Science.
Transformations Dr. Amy Zhang.
CS 480/680 Computer Graphics Transformations Dr. Frederick C Harris, Jr.
Graphics Graphics Korea University kucg.korea.ac.kr Transformations 고려대학교 컴퓨터 그래픽스 연구실.
Chi-Cheng Lin, Winona State University CS430 Computer Graphics Transformations of Objects – 2D Part I.
CSE 681 Review: Transformations. CSE 681 Transformations Modeling transformations build complex models by positioning (transforming) simple components.
Transformations Jehee Lee Seoul National University.
Matrices, Transformations and the 3D Pipeline Matthew Rusch Paul Keet.
Jinxiang Chai CSCE441: Computer Graphics 3D Transformations 0.
Jinxiang Chai Composite Transformations and Forward Kinematics 0.
Transformations of Objects – 3D
Geometric Objects and Transformation
16/5/ :47 UML Computer Graphics Conceptual Model Application Model Application Program Graphics System Output Devices Input Devices API Function.
CSE Real Time Rendering Week 5. Slides(Some) Courtesy – E. Angel and D. Shreiner.
Two-Dimensional Geometric Transformations ch5. 참조 Subjects : Basic Transformations Homogeneous Coordinates Composite Transformations Other Transformations.
Geometric Transformations
Review on Graphics Basics. Outline Polygon rendering pipeline Affine transformations Projective transformations Lighting and shading From vertices to.
Transformations CS 445/645 Introduction to Computer Graphics David Luebke, Spring 2003.
Geometric Transformations Sang Il Park Sejong University Many slides come from Jehee Lee’s.
3D Transformation A 3D point (x,y,z) – x,y, and z coordinates
1 Representation. 2 Objectives Introduce concepts such as dimension and basis Introduce coordinate systems for representing vectors spaces and frames.
Transformations of objects
CS559: Computer Graphics Lecture 9: 3D Transformation and Projection Li Zhang Spring 2010 Most slides borrowed from Yungyu ChuangYungyu Chuang.
Jinxiang Chai CSCE441: Computer Graphics 3D Transformations 0.
Computer Graphics I, Fall 2010 Transformations.
1 Introduction to Computer Graphics with WebGL Ed Angel Professor Emeritus of Computer Science Founding Director, Arts, Research, Technology and Science.
1 Angel: Interactive Computer Graphics 4E © Addison-Wesley 2005 Transformations Ed Angel Professor of Computer Science, Electrical and Computer Engineering,
Geometric Transformations Ceng 477 Introduction to Computer Graphics Computer Engineering METU.
CSCE 441 Computer Graphics: 2D Transformations
Modeling Transformation
Modeling Transformations Mario Costa Sousa University of Calgary CPSC 453, Fall 2001 Mario Costa Sousa University of Calgary CPSC 453, Fall 2001.
Objectives Introduce standard transformations Introduce standard transformations Derive homogeneous coordinate transformation matrices Derive homogeneous.
Forward Projection Pipeline and Transformations CENG 477 Introduction to Computer Graphics.
3D Geometric Transformation
Summary of Properties of 3D Affine Transformations
Review: Transformations
Review: Transformations
Computer Graphics Transformations
Transformations 고려대학교 컴퓨터 그래픽스 연구실 kucg.korea.ac.kr.
CSCE441: Computer Graphics 2D/3D Transformations
Transformations 2 University of British Columbia
TWO DIMENSIONAL TRANSFORMATION
Translation in Homogeneous Coordinates
Presentation transcript:

2003CS Hons RW778 Graphics1 Chapter 5: Transforming Objects 5.2 Introduction to Transformations 5.2 Introduction to Transformations –Affine transformations are useful: »Compose scene from instances »Exploit and repeat symmetries »Different viewpoints of same scene (move camera) »Computer animation –Graphics pipeline and current transformation (CT) –Object transformation vs coordinate transformation

2003CS Hons RW778 Graphics2 Chapter 5: Transforming Objects Transforming Points and Objects Transforming Points and Objects –Map point P to image Q –Most mappings continuous –Restrict ourselves to affine (linear) transformations The Affine Transformations The Affine Transformations –and similarly for vectors.

2003CS Hons RW778 Graphics3 Chapter 5: Transforming Objects Geometric Effects of Elementary 2D Affine Transformations Geometric Effects of Elementary 2D Affine Transformations –Combinations of : Translation, scaling, rotation, shear. –Translation: »Or, Q = P + d –Scaling: »scaling about the origin »negative: reflection »uniform vs differential scaling

2003CS Hons RW778 Graphics4 Chapter 5: Transforming Objects –Rotation: CCW –Shearing:

2003CS Hons RW778 Graphics5 Chapter 5: Transforming Objects Inverse of an Affine Transformation Inverse of an Affine Transformation –Most affine transformations are nonsingular (ie det(M) is nonzero) –To undo transformation Q = MP, use P = M -1 Q. –Scaling: –Rotation: –Shearing: –Translation:

2003CS Hons RW778 Graphics6 Chapter 5: Transforming Objects Composing Affine Transformations Composing Affine Transformations –For homogeneous coordinates: Affine transformations composed by matrix multiplication in reverse order Examples: Composing 2D Transformations Examples: Composing 2D Transformations –Rotate about an arbitrary point: translate, rotate, translate –Reflections about a tilted line

2003CS Hons RW778 Graphics7 Chapter 5: Transforming Objects Useful Properties of Affine Transformations Useful Properties of Affine Transformations –AT preserve affine combinations of points T(a 1 P 1 +a 2 P 2 ) = a 1 T(P 1 ) + a 2 T(P 2 ) –AT preserve lines and planes: If L(t)=(1-t)A+tB, then Q(t) = (1-t)T(A) + tT(B) –Parallelism of lines and planes is preserved: Given A+bt, we have M(A+bt)=MA + (Mb)t. Independent of A, with same direction b. –Columns of matrix reveal transformed coordinate frame »m 1 =Mi, m 2 =Mj »Frame (i,j, ) transforms into frame (m 1,m 2,m 3 )

2003CS Hons RW778 Graphics8 Chapter 5: Transforming Objects –Relative ratios are preserved: –Effects of transformations on areas: |det M| = –Every AT is composed of elementary operations: »2D:any M can be written as (translation)(shear)(scale)(rotation) »3D:any M as (transl)(scale)(rotation)(shear1)(shear2)

2003CS Hons RW778 Graphics9 Chapter 5: Transforming Objects 5.3 3D Affine Transformations 5.3 3D Affine Transformations –5.3.1 Elementary 3D Transformations »As for 2D. Selfstudy pp Note rotations: x-roll, y-roll, z-roll. –5.3.2 Composing 3D Affine Transformations »As for 2D. Selfstudy p –5.3.3 Combining rotations »3D rotation matrices do not commute! »M = R z (ß 3 )R y (ß 2 )R x (ß 1 ) : Euler’s angles

2003CS Hons RW778 Graphics10 Chapter 5: Transforming Objects –Rotations about arbitrary axis: »Any rotation about a point is equivalent to a single rotation about some axis through the point (Euler’s theorem). »R u (ß) = R y (-  )R z (  )R x (ß)R z (  )R y (  ) »OpenGL: glRotated (angle, ux, uy, uz)

2003CS Hons RW778 Graphics11 Chapter 5: Transforming Objects –Finding axis and angle of rotation: Read. 5.4 Changing Coordinate Systems 5.4 Changing Coordinate Systems –(a,b,1) T = M(c,d,1) T –Successive changes in coordinate frame: (a,b,1) T = M 1 (c,d,1) T = M 1 M 2 (e,f,1) T –Note: to transform points, premultiply. To transform coordinate system, postmultiply. –OpenGL: postmultiply by default.

2003CS Hons RW778 Graphics12 Chapter 5: Transforming Objects –Finding axis and angle of rotation: Read. 5.5 Affine Transformations in a Program 5.5 Affine Transformations in a ProgramSelfstudy. 5.6 Drawing 3D Scenes with OpenGL 5.6 Drawing 3D Scenes with OpenGL Selfstudy. Note : modelview matrix, projection matrix, viewport matrix.

2003CS Hons RW778 Graphics13 Chapter 5: Transforming Objects Homework Task 4 : Homework Task 4 : 1.Practice Exercise 5.2.6, p Practice Exercise , pp Practice Exercise 5.3.9, p Practice Exercise 5.5.3, p Practice Exercise 5.6.1, p Practice Exercise , p. 283.