2D Geometric Transformations

Slides:



Advertisements
Similar presentations
Computer Graphics: 3D Transformations
Advertisements

Transforming graphs of functions
Transformations Ed Angel Professor Emeritus of Computer Science
Flash Animation Using Linear Transformations By Kevin Hunter Kevin Hunter Marcus Yu Marcus Yu.
Geometric Transformations
CMPE 466 COMPUTER GRAPHICS
1 Geometrical Transformation 2 Outline General Transform 3D Objects Quaternion & 3D Track Ball.
Elementary 3D Transformations - a "Graphics Engine" Transformation procedures Transformations of coordinate systems Translation Scaling Rotation.
Graphics-1 Gentle Introduction to Computer Graphics (2) Based on: –David Brogan’s “Introduction to Computer Graphics” Course Slides, University of Virginia.
1 Geometrical Transformation Tong-Yee Lee. 2 Modeling Transform Specify transformation for objects Allow definitions of objects in own coordinate systems.
Transformations CS4395: Computer Graphics 1 Mohan Sridharan Based on slides created by Edward Angel.
Computer Graphics University of Palestine Dr. Sana’a Wafa Al-Sayegh
Essentials of Interactive Computer Graphics: Concepts and Implementation K. Sung, P. Shirley, S. Baer Chapter 8 Chapter 8: Transformation Operators.
Geometric Objects and Transformations Geometric Entities Representation vs. Reference System Geometric ADT (Abstract Data Types)
1 Computer Graphics Assistant Professor Dr. Sana’a Wafa Al-Sayegh 2 nd Semester ITGD3107 University of Palestine.
Technology and Historical Overview. Introduction to 3d Computer Graphics  3D computer graphics is the science, study, and method of projecting a mathematical.
CS 480/680 Computer Graphics Transformations Dr. Frederick C Harris, Jr.
ICS201 Lecture 12 : Gentle Introduction to Computer Graphics II King Fahd University of Petroleum & Minerals College of Computer Science & Engineering.
COLLEGE OF ENGINEERING UNIVERSITY OF PORTO COMPUTER GRAPHICS AND INTERFACES / GRAPHICS SYSTEMS JGB / AAS 1 Shading (Shading) & Smooth Shading Graphics.
COLLEGE OF ENGINEERING UNIVERSITY OF PORTO COMPUTER GRAPHICS AND INTERFACES / GRAPHICS SYSTEMS JGB / AAS Solid Modelling Graphics Systems / Computer.
©College of Computer and Information Science, Northeastern University CS 4300 Computer Graphics Prof. Harriet Fell Fall 2012 Lecture 12 – October 1, 2012.
Transformations Angel Angel: Interactive Computer Graphics5E © Addison-Wesley
1 Computer Graphics Week9 -3D Geometric Transformation.
Kinematics Jehee Lee Seoul National University. Kinematics How to animate skeletons (articulated figures) Kinematics is the study of motion without regard.
Computer Graphics 3D Transformations. Translation.
Review on Graphics Basics. Outline Polygon rendering pipeline Affine transformations Projective transformations Lighting and shading From vertices to.
Transformations on the Coordinate Plane: Translations and Rotations.
Geometric Transformations UBI 516 Advanced Computer Graphics Aydın Öztürk
COLLEGE OF ENGINEERING UNIVERSITY OF PORTO COMPUTER GRAPHICS AND INTERFACES / GRAPHICS SYSTEMS JGB / AAS D Geometric Transformations Graphics Systems.
9-2 Reflections Objective: To find reflection images of figures.
KINEMATICS ANALYSIS OF ROBOTS (Part 5). This lecture continues the discussion on the analysis of the forward and inverse kinematics of robots. After this.
Computer Graphics I, Fall 2010 Transformations.
End effector End effector - the last coordinate system of figure Located in joint N. But usually, we want to specify it in base coordinates. 1.
1 Angel: Interactive Computer Graphics 4E © Addison-Wesley 2005 Transformations Ed Angel Professor of Computer Science, Electrical and Computer Engineering,
8-7 Transformation Objective: Students recognize, describe, and show transformation.
YEAR 11 MATHS REVISION Transformations.
Transformations. Transformations Introduce standard transformations ◦ Rotation ◦ Translation ◦ Scaling ◦ Shear Derive homogeneous coordinate transformation.
Midterm Review Ceng 477 Introduction to Computer Graphics Computer Engineering METU.
Introduction to 3-D Viewing Glenn G. Chappell U. of Alaska Fairbanks CS 381 Lecture Notes Monday, October 27, 2003.
Instructor: Dr. Shereen Aly Taie Basic Two-Dimensional Geometric Transformation 5.2 Matrix Representations and Homogeneous Coordinates 5.3 Inverse.
Algebra 4-2 Transformations on the Coordinate Plane
Algebra 4-2 Transformations on the Coordinate Plane
Modeling Transformations
Lecture 10 Geometric Transformations In 3D(Three- Dimensional)
© T Madas.
3D Geometric Transformation
10.1A Isometries Name four transformations? What is an isometry?
Computer Graphics 3D Transformations
3D Geometric Transformations
Algebra 4-2 Transformations on the Coordinate Plane
3B Reflections 9-2 in textbook
2D Transformation.
Lecture 7 Geometric Transformations (Continued)
3D Graphics Rendering PPT By Ricardo Veguilla.
GSP 221 Innovative Education-- snaptutorial.com
FP1 Matrices Transformations
Viewing and Perspective Transformations
4-4 Geometric Transformations with Matrices
2D Geometric Transformations
4-7 Congruence Transformations
Algebra 4-2 Transformations on the Coordinate Plane
Transformation Operators
Algebra 4-2 Transformations on the Coordinate Plane
Transformations.
Algebra 4-2 Transformations on the Coordinate Plane
Transformations with Matrices
Geometric Transformations
Transformations on the Coordinate Plane
Translation in Homogeneous Coordinates
Presentation transcript:

2D Geometric Transformations Graphics Systems / Computer Graphics and Interfaces COLLEGE OF ENGINEERING UNIVERSITY OF PORTO COMPUTER GRAPHICS AND INTERFACES / GRAPHICS SYSTEMS JGB / AAS 2004

2D Geometric Transformations The geometric transformations in computer graphics are essential to position, change the orientation and scale objects in the scene created. The movement is also implemented by the processing parameters vary over time. Transformations: Translation Scaling Rotation COLLEGE OF ENGINEERING UNIVERSITY OF PORTO COMPUTER GRAPHICS AND INTERFACES / GRAPHICS SYSTEMS JGB / AAS 2004

Translation xT= X + Tx yT= Y + Ty Vertices: (4,5) and (7,5) TxT = 3y= -4 The pair of translation is called for translation vector. Each vertex is assigned a displacement T: In the form of matrix product: COLLEGE OF ENGINEERING UNIVERSITY OF PORTO COMPUTER GRAPHICS AND INTERFACES / GRAPHICS SYSTEMS JGB / AAS 2004

Scaling xT= X * Sx yT* Y = Sy Regarding the origin. Sx = 2 Sy = 2 100 xT= X * Sx yT* Y = Sy Regarding the origin. 120 40 80 150 20 40 60 80 40 120 200 Sx = 2 Sy = 2 Sx = 2 Sy = -1.5 COLLEGE OF ENGINEERING UNIVERSITY OF PORTO COMPUTER GRAPHICS AND INTERFACES / GRAPHICS SYSTEMS JGB / AAS 2004

Scaling In matrix form: Scale Factor: > Increase the subject 1 <1 reduces the object sx= Sy Uniform scaling factor  does not distort the object COLLEGE OF ENGINEERING UNIVERSITY OF PORTO COMPUTER GRAPHICS AND INTERFACES / GRAPHICS SYSTEMS JGB / AAS 2004

Rotation x = R.cos (a) y = R.sen (a) Around the origin. 100 xRYR x = R.cos (a) R b x, y y = R.sen (a) Around the origin. the xRR.cos = (a + b) = R.cos (a). Cos (b) - R.sen (a). Sin (b) = x.cos (b) - y.sen (b) yRR.sen = (a + b) = R. Sin (b).cos (a) + R.sen (a). Cos (b) = x.sen (b) + y.cos (b) Obtains a new position on the previous and the relative angle of rotation. Rotation of -45 Vertices: (20.0) (60.0) (40,100) Vertices: (14:14, -14.14), (42.43, -42.43), (98.99, 42.43) COLLEGE OF ENGINEERING UNIVERSITY OF PORTO COMPUTER GRAPHICS AND INTERFACES / GRAPHICS SYSTEMS JGB / AAS 2004

Rotation + In matrix form: Note: b positive movement in the opposite clockwise direction. + COLLEGE OF ENGINEERING UNIVERSITY OF PORTO COMPUTER GRAPHICS AND INTERFACES / GRAPHICS SYSTEMS JGB / AAS 2004

Composition of Transformations Tc The application of a sequence of operations = 1 single transformation COLLEGE OF ENGINEERING UNIVERSITY OF PORTO COMPUTER GRAPHICS AND INTERFACES / GRAPHICS SYSTEMS JGB / AAS 2004

Composition of Transformations Initial situation (20.0) (60.0) (40,100) After rotation (0, -20) (0, -60) (100, -40) a = - 90 ° After translation (-80, -20) (-80, -60) (20, -40) Tx = -80, Ty = 0 -80 0.0 100 20 60 Replacing the transformations: After translation (-60.0) (-20.0) (-40.100) Tx = -80, Ty = 0 After rotation (0.60) (0.20) (100.40) a = - 90 ° 100 20 60 Initial situation (20.0) (60.0) (40,100) 100 20 60 Conclusion: The application of the transformations is not commutative COLLEGE OF ENGINEERING UNIVERSITY OF PORTO COMPUTER GRAPHICS AND INTERFACES / GRAPHICS SYSTEMS JGB / AAS 2004

Homogeneous coordinates The previous sequence, rotation, translation then applied to each vertex can be written as: 1 If the matrices representing the transformations were of the same size would be able to combine. 2 However, the above transformations can also be written as (homogeneously) We can then write: The matrix product is: Associative In general Noncommutative COLLEGE OF ENGINEERING UNIVERSITY OF PORTO COMPUTER GRAPHICS AND INTERFACES / GRAPHICS SYSTEMS JGB / AAS 2004

Homogeneous coordinates - summary Rotation Matrix Matrix Translation Escalation Matrix In homogeneous coordinates of an object n dimensions is represented in space n +1 dimensions. (X, y)  (x.h, y.h h) 2D 3D We consider h = 1 COLLEGE OF ENGINEERING UNIVERSITY OF PORTO COMPUTER GRAPHICS AND INTERFACES / GRAPHICS SYSTEMS JGB / AAS 2004

Transformations - Examples P '= T (dx1, Dy1) * P T (dx2, Dy2) T (dx1, Dy1) R'' = T (dx2, Dy2) * P ' P'' P T (?,?) R'' = T (dx2, Dy2) * T (dx1, Dy1) * P T (dx2, Dy2) * T (dx1, Dy1) = T (dx1+ Dx2, Dy1+ Dy2) Check that: O (sx2, Sy2) S * (sx1, Sy1) S = (sx1* Sx2, Sy1* Sy2) R (the2) * R (the1) = R (a2+ A1) COLLEGE OF ENGINEERING UNIVERSITY OF PORTO COMPUTER GRAPHICS AND INTERFACES / GRAPHICS SYSTEMS JGB / AAS 2004

Transformations on a arbitrary point (pivot) Rotation The rotation moves objects around the origin. Rotation of -45 Solution: Traverse the object so that the point Anchorman coincides with the origin Rotating the object around the origin Making the translation of the object so that the point Anchorman return to starting position (inverse of first) COLLEGE OF ENGINEERING UNIVERSITY OF PORTO COMPUTER GRAPHICS AND INTERFACES / GRAPHICS SYSTEMS JGB / AAS 2004

Transformations on a arbitrary point (pivot) Transformation matrix Scaling Traverse the object so that the point Anchorman coincides with the origin Climb the object Making the translation of the object so that the point Anchorman return to starting position (inverse of first) COLLEGE OF ENGINEERING UNIVERSITY OF PORTO COMPUTER GRAPHICS AND INTERFACES / GRAPHICS SYSTEMS JGB / AAS 2004

Exercise Determine the transformation matrix for: T (-x1,-y1) If P1= (1,2) and P2= (3.3) determine the matrix of equivalent transformation. COLLEGE OF ENGINEERING UNIVERSITY OF PORTO COMPUTER GRAPHICS AND INTERFACES / GRAPHICS SYSTEMS JGB / AAS 2004

Other transformations Reflection In relation to axis x corresponds to a 180 ° rotation in 3D space around the axis of reflection, which results in a scaling S (1, -1) y x x y In relation to axis y: COLLEGE OF ENGINEERING UNIVERSITY OF PORTO COMPUTER GRAPHICS AND INTERFACES / GRAPHICS SYSTEMS JGB / AAS 2004

Other transformations Reflection relative to the line y = x x y x y Reflection relative to the line y =-x COLLEGE OF ENGINEERING UNIVERSITY OF PORTO COMPUTER GRAPHICS AND INTERFACES / GRAPHICS SYSTEMS JGB / AAS 2004

Inverse Transformations If a transformation possibly composite is given by a matrix Mdimensions of 3x3, then the inverse transformation that puts the object in its initial position (ie no transformation) is given by M-1. Once M represents one or more transformations, the inverse matrix should be. M.M-1 = I For some transformations is easy to find the inverse matrix: Translation: Scaling: COLLEGE OF ENGINEERING UNIVERSITY OF PORTO COMPUTER GRAPHICS AND INTERFACES / GRAPHICS SYSTEMS JGB / AAS 2004

Exercise (Question of the May 23, 2002 test) T(1,7)S(1,-3)T(0,-7). Nota: é necessário calcula-la [1 0 1] [0 -3 28] [0 0 1] Sim, porque o escalamento é feito sobre Y. Se fosse também sobre X a distância entre as letras aumentava. COLLEGE OF ENGINEERING UNIVERSITY OF PORTO COMPUTER GRAPHICS AND INTERFACES / GRAPHICS SYSTEMS JGB / AAS 2004