Dx = 2 dy = 3 Y X 0 1 1 2 2 3 4 5 6 7 8 9 10 3 4 5 6 2D Translation A translation is applied to an object by repositioning it along a straight-line path.

Slides:



Advertisements
Similar presentations
1Computer Graphics Homogeneous Coordinates & Transformations Lecture 11/12 John Shearer Culture Lab – space 2
Advertisements

Transformations Ed Angel Professor Emeritus of Computer Science
COMPUTER GRAPHICS 2D TRANSFORMATIONS.
Computer Graphics Lecture 4 Geometry & Transformations.
Geometric Transformations
Three Dimensional Modeling Transformations
Chapter 4.1 Mathematical Concepts. 2 Applied Trigonometry Trigonometric functions Defined using right triangle  x y h.
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.
2.1 si SI31 Advanced Computer Graphics AGR Lecture 2 Basic Modelling.
CSCE 590E Spring 2007 Basic Math By Jijun Tang. Applied Trigonometry Trigonometric functions  Defined using right triangle  x y h.
Course Website: Computer Graphics 3: 2D Transformations.
I N T R O D U C T I O N T O C O M P U T E R G R A P H I C S Stuff Andries van Dam September 12, 2006 Transformations 1/33 Transformations.
Transformations. 2 Angel: Interactive Computer Graphics 3E © Addison-Wesley 2002 Coordinate-Free Geometry When we learned simple geometry, most of us.
Transformations CS4395: Computer Graphics 1 Mohan Sridharan Based on slides created by Edward Angel.
2D Transformations Unit - 3. Why Transformations? In graphics, once we have an object described, transformations are used to move that object, scale it.
CS 450: Computer Graphics 2D TRANSFORMATIONS
C O M P U T E R G R A P H I C S Stuff Jian Chen January 15, 2010 Transformations 1/28 Geometric Transformations By Andries van Dam.
I N T R O D U C T I O N T O C O M P U T E R G R A P H I C S Andries van Dam September 14, 2004 Transformation 1/32 Transformations.
C O M P U T E R G R A P H I C S Stuff CMSC 435 / 634 Transformations 1/29 Geometric Transformations Readings: Chapters 5-6.
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.
Transformation of Graphics
CS 480/680 Computer Graphics Transformations Dr. Frederick C Harris, Jr.
Mathematical Foundations Sections A-1 to A-5 Some of the material in these slides may have been adapted from university of Virginia, MIT and Åbo Akademi.
2D Transformation of Graphics
Lecture Notes: Computer Graphics.
Part7: Geometric Transformations
CSE 681 Review: Transformations. CSE 681 Transformations Modeling transformations build complex models by positioning (transforming) simple components.
Transformations Jehee Lee Seoul National University.
CS 325 Introduction to Computer Graphics 02 / 17 / 2010 Instructor: Michael Eckmann.
CS 376 Introduction to Computer Graphics 02 / 16 / 2007 Instructor: Michael Eckmann.
Transformations Angel Angel: Interactive Computer Graphics5E © Addison-Wesley
Computer Graphics 2D Transformations. 2 of 74 Contents In today’s lecture we’ll cover the following: –Why transformations –Transformations Translation.
Geometric Objects and Transformation
Transformation.
CSE Real Time Rendering Week 5. Slides(Some) Courtesy – E. Angel and D. Shreiner.
Introduction to Computer Graphics Geometric Transformations
Two-Dimensional Geometric Transformations ch5. 참조 Subjects : Basic Transformations Homogeneous Coordinates Composite Transformations Other Transformations.
Two-Dimensional Geometric Transformations A two dimensional transformation is any operation on a point in space (x, y) that maps that point's coordinates.
Geometric Transformations Hearn & Baker Chapter 5 Some slides are taken from Robert Thomsons notes.
Geometric Transformations
GEOMETRIC TRANFORMATIONS Presented By -Lakshmi Sahithi.
Review on Graphics Basics. Outline Polygon rendering pipeline Affine transformations Projective transformations Lighting and shading From vertices to.
2D Geometric Transformation Translation A translation is applied to an object by repositioning it along a straight-line path from one coordinate location.
Affine Geometry.
II-1 Transformations Transformations are needed to: –Position objects defined relative to the origin –Build scenes based on hierarchies –Project objects.
Learning Objectives Affine transformations Affine transformations Translation Translation Rotation Rotation Scaling Scaling Reflection Reflection Shear.
Honors Geometry.  We learned how to set up a polygon / vertex matrix  We learned how to add matrices  We learned how to multiply matrices.
Computer Graphics I, Fall 2010 Transformations.
1 Teaching Innovation - Entrepreneurial - Global The Centre for Technology enabled Teaching & Learning, N Y S S, India DTEL DTEL (Department for Technology.
CS 551 / 645: Introductory Computer Graphics Viewing Transforms.
CS 325 Introduction to Computer Graphics 02 / 19 / 2010 Instructor: Michael Eckmann.
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,
Computer Graphics Lecture 11 2D Transformations I Taqdees A. Siddiqi
Geometric Transformations Ceng 477 Introduction to Computer Graphics Computer Engineering METU.
CSCE 441 Computer Graphics: 2D Transformations
Transformations. Transformations Introduce standard transformations ◦ Rotation ◦ Translation ◦ Scaling ◦ Shear Derive homogeneous coordinate transformation.
Objectives Introduce standard transformations Introduce standard transformations Derive homogeneous coordinate transformation matrices Derive homogeneous.
Computer Graphics 2D Transformations
Transforms.
Transformations Objectives
Geometric Transformations Hearn & Baker Chapter 5
Computer Graphics Transformations.
Computer Graphics Transformations.
2D Geometric Transformations
Transformations Ed Angel
Transformations Ed Angel Professor Emeritus of Computer Science
Isaac Gang University of Mary Hardin-Baylor
Presentation transcript:

dx = 2 dy = 3 Y X D Translation A translation is applied to an object by repositioning it along a straight-line path from one coordinate location to another Component-wise addition of vectors v’ = v + t where and x’ = x + dx y’ = y + dy To move polygons: translate vertices (vectors) and redraw lines between them Preserves lengths (isometric) Preserves angles (conformal) | Website for Students | VTU - Notes - Question Papers Note: House shifts position relative to origin

2D Translation Rigid body transformation Polygons are translated by adding the translation vector to the coordinate position of each vertex and generating the polygon using the new set of vertex coordinates For circle and ellipse, translate the center coordinates and redraw the object in the new location Translate the curves by (say, splines) displacing the coordinate positions defining the objects and redraw using translated points | Website for Students | VTU - Notes - Question Papers

2D Scaling The scaling alters the size of an object Component-wise scalar multiplication of vectors v’ = Sv where and Does not preserve lengths Does not preserve angles (except when scaling is uniform) | Website for Students | VTU - Notes - Question Papers Y X Note: House shifts position relative to origin

2D Rotation A 2D rotation is applied to an object by repositioning it along a circular path in the xy-plane Rotation of vectors through an angle θ v’ = R θ v where and x’ = x cos θ – y sin θ y’ = x sin θ + y cos θ Proof by double angle formula Preserves lengths and angles | Website for Students | VTU - Notes - Question Papers Y X NB: A rotation by 0 angle, i.e. no rotation at all, gives us the identity matrix Note: House shifts position relative to origin x = r cos (  y = r sin (  x = r cos  y = r sin 

Rotation about fixed points | Website for Students | VTU - Notes - Question Papers Y X

2D Rotation Rigid body transformation Every point on the object is rotated with the same angle Straight line segment is rotated by applying the rotation equations to line end points and redrawing with new end points Polygons are rotated by displacing each vertex through the specified rotation angle and regenerating the polygon using new vertices Curved lines are rotated by repositioning the defining points and redrawing the curves Circle can be rotated about a non central axis by moving the center position through the arc that subtends the specified rotation angle Ellipse can be rotated about its center coordinates by rotating the major and minor axes | Website for Students | VTU - Notes - Question Papers

2D Rotation and Scale are Relative to Origin Suppose object is not centered at origin Solution: move to the origin, scale and/or rotate, then move it back. Would like to compose successive transformations…

Reflection | Website for Students | VTU - Notes - Question Papers Reflection produces a mirror image of an object Mirror image for a 2D reflection is generated relative to an axis of reflection by rotating the object 180 degrees corresponds to negative scale factors original s x = -1 s y = 1 s x = -1 s y = -1s x = 1 s y = -1

Shear Shear distorts the shape Helpful to add one more basic transformation Equivalent to pulling faces in opposite directions Consider simple shear along x axis x’ = x + y cot  y’ = y z’ = z H(  ) =

Homogenous Coordinates Translation, scaling and rotation are expressed (non- homogeneously) as: Composition is difficult to express – Translation is not expressed as a matrix multiplication Homogeneous coordinates allows expression of all three as 3x3 matrices for easy composition w is 1 for affine transformations | Website for Students | VTU - Notes - Question Papers translation: scale: rotation: v’ = v + t v’ = Sv v’ = Rv

What is ? P 2d is intersection of line determined by P h with the w = 1 plane Infinite number of points correspond to (x, y, 1) : they constitute the whole line (tx, ty, tw) | Website for Students | VTU - Notes - Question Papers P 2d (x/w,y/w,1) P h (x,y,w) Y X W 1

2D Homogeneous Coordinate Transformations For points written in homogeneous coordinates, translation, scaling and rotation relative to the origin are expressed homogeneously as: | Website for Students | VTU - Notes - Question Papers

2D Homogeneous Coordinate Transformations Consider the rotation matrix: The 2 x 2 submatrix columns are: – unit vectors (length=1) – perpendicular (dot product=0) – vectors into which X-axis and Y-axis rotate (are images of x and y unit vectors) The 2 x 2 submatrix rows are: – unit vectors – perpendicular – rotate into X-axis and Y-axis (are pre-images of x and y unit vectors) Preserves lengths and angles of original geometry. Therefore, matrix is a “rigid body” transformation | Website for Students | VTU - Notes - Question Papers

Examples Translate [1,3] by [7,9] Scale [2,3] by 5 in the x direction and 10 in the Y direction Rotate [2,2] by 90 ° | Website for Students | VTU - Notes - Question Papers

Matrix Compositions: Using Translation Avoiding unwanted translation when scaling or rotating an object not centered at origin: – translate object to origin, perform scale or rotate, translate back. How would you scale the house by 2 in “its” y and rotate it through 90° ? Remember: matrix multiplication is not commutative! Hence order matters | Website for Students | VTU - Notes - Question Papers

Y X Y X Translation → Rotation Rotation → Translation Transformations are NOT Commutative | Website for Students | VTU - Notes - Question Papers

3D Basic Transformations Translation Scaling | Website for Students | VTU - Notes - Question Papers (right-handed coordinate system) x y z

3D Basic Transformations Rotation about X-axis | Website for Students | VTU - Notes - Question Papers (right-handed coordinate system) Rotation about Y-axis Rotation about Z-axis For rotation about x axis, x is unchanged For rotation about y axis, y is unchanged Rotation about z axis in three dimensions leaves all points with the same z Equivalent to rotation in two dimensions in planes of constant z

Inverses of (2D and) 3D Transformations | Website for Students | VTU - Notes - Question Papers 1.Translation: 2.Scaling: 3.Rotation: 4.Shear:

References Edward Angel –Interactive Computer Graphics Hearn and Baker - Computer Graphics James D. Foley - Computer Graphics: principles and practice Asthana and Sinha- Computer Graphics PPTs: Von Dom, Bing-Yu Chen | Website for Students | VTU - Notes - Question Papers

THANK YOU | Website for Students | VTU - Notes - Question Papers