2D Geometric Transformations

Slides:



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

COMPUTER GRAPHICS 2D TRANSFORMATIONS.
Computer Graphics Lecture 4 Geometry & Transformations.
1 Computer Graphics Chapter 6 2D Transformations.
3-D Geometry.
Transformations CS4395: Computer Graphics 1 Mohan Sridharan Based on slides created by Edward Angel.
Geometric Transformations
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
COS 397 Computer Graphics Svetla Boytcheva AUBG, Spring 2013.
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.
Transformations Dr. Amy Zhang.
CS 480/680 Computer Graphics Transformations Dr. Frederick C Harris, Jr.
Computer Graphics Bing-Yu Chen National Taiwan University.
Graphics Graphics Korea University cgvr.korea.ac.kr 2D Geometric Transformations 고려대학교 컴퓨터 그래픽스 연구실.
Lecture Notes: Computer Graphics.
Homogeneous Coordinates (Projective Space) Let be a point in Euclidean space Change to homogeneous coordinates: Defined up to scale: Can go back to non-homogeneous.
Dx = 2 dy = 3 Y X D Translation A translation is applied to an object by repositioning it along a straight-line path.
Transformations Jehee Lee Seoul National University.
Transformations Angel Angel: Interactive Computer Graphics5E © Addison-Wesley
Geometric Camera Models
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.
Computer Graphics 3D Transformations. Translation.
Two-Dimensional Geometric Transformations A two dimensional transformation is any operation on a point in space (x, y) that maps that point's coordinates.
Review on Graphics Basics. Outline Polygon rendering pipeline Affine transformations Projective transformations Lighting and shading From vertices to.
Multimedia Programming 07: Image Warping Keyframe Animation Departments of Digital Contents Sang Il Park.
3D Transformation A 3D point (x,y,z) – x,y, and z coordinates
Affine Geometry.
1 Representation. 2 Objectives Introduce concepts such as dimension and basis Introduce coordinate systems for representing vectors spaces and frames.
Transformations of objects
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,
Graphics Graphics Korea University kucg.korea.ac.kr Mathematics for Computer Graphics 고려대학교 컴퓨터 그래픽스 연구실.
Computer Graphic 2 D Transformation.
Modeling Transformation
Robotic Arms and Matrices By Chris Wong and Chris Marino.
Instructor: Dr. Shereen Aly Taie Basic Two-Dimensional Geometric Transformation 5.2 Matrix Representations and Homogeneous Coordinates 5.3 Inverse.
Transformations University of British Columbia CPSC 314 Computer Graphics Jan-Apr 2016 Tamara Munzner.
Objectives Introduce standard transformations Introduce standard transformations Derive homogeneous coordinate transformation matrices Derive homogeneous.
Coordinate Algebra Practice EOCT Answers Unit 5.
Transforms.
Transformations Objectives
3. Transformation
Geometric Transformations Hearn & Baker Chapter 5
2D Transformations By: KanwarjeetSingh
Computer Graphics CC416 Week 15 3D Graphics.
Computer Graphics Transformations.
3D Geometric Transformations
Computer Graphics Transformations.
Introduction to Computer Graphics CS 445 / 645
Lecture 7 Geometric Transformations (Continued)
Homogeneous Coordinates (Projective Space)
Computer Graphics Transformations
Linear Algebra Review.
COMP 175: Computer Graphics February 9, 2016
CSC4820/6820 Computer Graphics Algorithms Ying Zhu Georgia State University Transformations.
Geometric Camera Models
Chapter IV Spaces and Transforms
Transformations Ed Angel
Geometric Objects and Transformations (II)
Transformations Ed Angel Professor Emeritus of Computer Science
Isaac Gang University of Mary Hardin-Baylor
Transformations 2 University of British Columbia
TWO DIMENSIONAL TRANSFORMATION
The Pinhole Camera Model
Coordinate Algebra Practice EOCT Answers Unit 5.
Presentation transcript:

2D Geometric Transformations

How do we use Geometric Transformations? Objects in a scene at the lowest level are a collection of vertices

How do we use Geometric Transformations? A scene has a camera/view point from which the scene is viewed The camera has some location and some orientation in 3D-space These correspond to Translation and Rotation transformations

Linear Transformations The vectors in the set are linearly independent Any vector in the vector space can be expressed as a linear combination of the basis vectors: V = c1V1 + c2V2 Vector addition: f(e1+e2) = f(e1) + f(e2) Scalar multiplication: f(c e1) = cf(v e1) for all scalars c f(x) = f(x1 , x2) := (3x1+2x2 , -3x1+4x2) f(e1 +e2) = f(e1(1)+ e2(1) , e1(2)+ e2(2)) = (3(e1(1)+ e2(1) )+2(e1(2)+ e2(2) ) , - 3(e1(2) + e2(2) )+4(e1(2)+ e2(2) )) = (3 e1(1) +2 e1(2) , -3 e1(1) +4 e1(2)) + (3 e2(1) +2 e2(2) , -3 e2(2) +4 e2(2) = f(e1) + f(e2)

Linear Transformations f(x) = f(x1 , x2) := (3x1+2x2 , -3x1+4x2) f(x) = Tx, where T = 3 2 −3 4 and x = T is a matrix representing a linear transformation. If T is invertible, then there is a sequence of rotations, scales, and/or shears It can perform the mapping represented by that linear transformation

2D Transformations Linear transformations can be represented as invertible (non-singular) matrices 2D transformations can be represented by 2x2 matrices: A transformation of an arbitrary column vector x = has the form:

Transformations of Points around the Origin Rotations Scaling Graphical usage leaves the origin invariant

Transformations of Points around the Origin e1 and e2 be the standard basis vectors: This a strategy for deriving transformation matrices

Scale Transformation Matrix Scale x by 3, y by 2 (Sx = 3, Sy = 2) v = (original vertex); v’ = (new vertex) v’ = Sv Derive S by determining how e1 and e2 should be transformed (scale in X by Sx) (scale in Y by Sy)

Rotation Transformation Matrix Rotate by θ about the origin v’ = Rθv, where v = (original vertex) v’ = (new vertex) e1 and e2 should be transformed to derive R (first column of Rθ) (second column of Rθ ) R v =

Rotation Properties Rotation preserves lengths in objects and angles between parts of objects (rigid-body rotation) For objects not centered at the origin, an unwanted translation might be introduced (rotation is always about the origin)

Translation Transformation Matrix Translation is not a linear transformation. The origin is not invariant Translation can’t be represented as a 2x2 invertible matrix The solution? v’ = v + t, where t = Using vector addition is not consistent with 2x2 transformations as matrices Homogeneous Coordinates adds an additional dimension, the w-axis, and an extra coordinate, the w-component 2D -> 3D ( 3D is hyperspace for embedding 2D space

Homogeneous Coordinates Allow expression of all three 2D transformations as 3x3 matrices We start with the point P2d on the xy plane and apply a mapping to bring it to the w-plane in the hyperspace P2d(x,y)  Ph(wx, wy, w), w≠0 The resulting (x’,y’) coordinates in our new point Ph are different from the original (x,y), x’ = wx, y’ = wy Ph(x’, y’, w), w ≠ 0 To obtain the corresponding point in 2D-space, it is required perform the inverse of the previous mapping (divide all entries by w) The vertex v = is now represented as v=

Homogeneous Coordinates We want our transformations T to map points v = to points v’ = Coordinates have been translated, and v’ is still homogeneous

Homogenized Transformations Scale by 15 in the x direction, 17 in the y Rotation: Rotate by 123o Rotate by 123o Translate by -16 in the x direction, +18 in the y

Shearing Transformation Matrix Y X 1 2 3 4 5 6 7 8 9 10 Squares become parallelograms; x-coordinates skew to right, y stays the same The base of the house (at y = 1) remains horizontal but shifts right. 2D homogeneous 2D non-homogeneous

Reflection Transformation Matrix