Two-Dimensional Geometric Transformations

Slides:



Advertisements
Similar presentations
3D Transformations Assist. Prof. Dr. Ahmet Sayar
Advertisements

Computer Graphics: 3D Transformations
COMPUTER GRAPHICS 2D TRANSFORMATIONS.
Gursharan Singh Tatla TRANSFORMATIONS Gursharan Singh Tatla Gursharan Singh Tatla.
Computer Graphics Lecture 4 Geometry & Transformations.
Geometric Transformations
Transformations.
Mapping: Scaling Rotation Translation Warp
1 Computer Graphics Chapter 6 2D Transformations.
Chapter 5 Geometric Transformations
2D TRANSFORMATIONS. 2D Transformations What is transformations? –The geometrical changes of an object from a current state to modified state. Why the.
25 May May May 2015Week 5-2D Transformations1 2D Transformations By: KanwarjeetSingh.
2D TRANSFORMATIONS.
CMPE 466 COMPUTER GRAPHICS
Linear Algebra and SVD (Some slides adapted from Octavia Camps)
Image Warping : Computational Photography Alexei Efros, CMU, Fall 2008 Some slides from Steve Seitz
6/22/2015©Zachary Wartell 2D Transformations Revision 1.2 Copyright Zachary Wartell, University of North Carolina All Rights Reserved Textbook: Chapter.
Computer Graphics with OpenGL 3e
3D Graphics Goal: To produce 2D images of a mathematically described 3D environment Issues: –Describing the environment: Modeling (mostly later) –Computing.
CS 450: Computer Graphics 2D TRANSFORMATIONS
The linear algebra of Canadarm
Mathematical Fundamentals
COS 397 Computer Graphics Svetla Boytcheva AUBG, Spring 2013.
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
Computer Graphics Bing-Yu Chen National Taiwan University.
Graphics Graphics Korea University cgvr.korea.ac.kr 2D Geometric Transformations 고려대학교 컴퓨터 그래픽스 연구실.
2D Transformation of Graphics
2D Transformations.
Geometric Transformations Jehee Lee Seoul National University.
2D Geometric Transformations
Part7: Geometric Transformations
 2D Transformations 2D Transformations  Translation Translation  Rotation Rotation  Scaling Scaling.
CGPage: 1 東吳資訊科學 江清水 3.1 2D Geometry - points and polygons X Y A point in 2D is represented by two real numbers (X,Y) A line segment is represented by.
CSE 681 Review: Transformations. CSE 681 Transformations Modeling transformations build complex models by positioning (transforming) simple components.
Transformations Jehee Lee Seoul National University.
Geometric Transformations
Computer Graphics 2D Transformations. 2 of 74 Contents In today’s lecture we’ll cover the following: –Why transformations –Transformations Translation.
Geometrical Transformations 2 Adapted from Fundamentals of Interactive Computer Graphics, Foley and van Dam, pp , by Geb Thomas.
Transformation.
Computer Graphics 3D Transformations. Translation.
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.
Geometric Transformations UBI 516 Advanced Computer Graphics Aydın Öztürk
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.
CS559: Computer Graphics Lecture 9: 3D Transformation and Projection Li Zhang Spring 2010 Most slides borrowed from Yungyu ChuangYungyu Chuang.
Computer Graphics I, Fall 2010 Transformations.
CS 551 / 645: Introductory Computer Graphics Viewing Transforms.
Geometric Transformations Ceng 477 Introduction to Computer Graphics Computer Engineering METU.
2D Transformations What is transformations? The geometrical changes of an object from a current state to modified state. Why the transformations is needed?
Computer Graphic 2 D Transformation.
Image Warping 2D Geometric Transformations
3D Geometry and Transformations
Modeling Transformation
Transformations. Modeling Transformations  Specify transformations for objects  Allows definitions of objects in own coordinate systems  Allows use.
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.
3D Geometric Transformation
3. Transformation
2D Geometric Transformations
3D Transformation.
Computer Graphics 3D Transformations
3D Geometric Transformations
Line and Character Attributes 2-D Transformation
TWO DIMENSIONAL TRANSFORMATION
Presentation transcript:

Two-Dimensional Geometric Transformations Chapter 5 Two-Dimensional Geometric Transformations

Two-Dimensional Geometric Transformations Basic Transformations Translation Rotation Scaling Composite Transformations Other transformations Reflection Shear

Translation Translation transformation Rigid-body transformation y y Translation vector or shift vector T = (tx, ty) Rigid-body transformation Moves objects without deformation y y P’ T T p x x

Rotation Rotation transformation x’=rcos(+)= rcoscos-rsin sin y y’=rsin(+)= rcossin+rsin cos y x=rcos y=rsin  P’ (x’,y’) x’=x cos-ysin y’=xsin+ycos P(x,y)   r x P’= R· P

Rotation Pivot point x’=xr+(x- xr)cos-(y- yr)sin y y’=yr+(x- xr)sin+(y- yr)cos y P’ (x’,y’) P(x,y)   r (xr,yr) x

Scaling Scaling transformation Scaling factors, sx and sy Uniform scaling y y x x

Scaling Fixed point

Matrix Representations and Homogeneous Coordinates Translation

Matrix Representations Scaling Rotation

Composite Transformations Translations

Composite Transformations Scaling

Composite Transformations Rotations

General Pivot-Point Rotation Rotations about any selected pivot point (xr,yr) Translate-rotate-translate

General Pivot-Point Rotation

General Fixed-Point Scaling Scaling with respect to a selected fixed position (xf,yf)

General Fixed-Point Scaling Translate-scale-translate

General Scaling Directions Scaling factors sx and sy scale objects along the x and y directions. We scale an object in other directions with scaling factors s1 and s2

General Scaling Directions

Concatenation Properties Matrix multiplication is associative. A·B ·C = (A·B )·C = A·(B ·C) Transformation products may not be commutative Be careful about the order in which the composite matrix is evaluated. Except for some special cases: Two successive rotations Two successive translations Two successive scalings rotation and uniform scaling

Concatenation Properties Reversing the order A sequence of transformations is performed may affect the transformed position of an object.

General Composite Transformations and Computer Efficiency A general two-dimensional transformation Rotation-scaling terms rsij Translational terms trsx and trsy Minimum number of computations Four multiplications Four additions

Rigid-Body Transformation Rigid-body transformation matrix The upper-left 2-by-2 submatrix is an orthogonal matrix Two vectors (rxx, rxy) and (ryx, ryy) form an orthogonal set of unit vectors. Multiplicative rotation terms rij Translational terms trx and try

Rigid-Body Transformation The orthogonal property of rotation matrices We know the final orientation of an object Construct the desired transformation by assigning the elements of u’ to the first row of the rotation matrix and the elements of v’ to the second row.

Computational Efficiency Use approximations and iterative calculations to reduce computations Approximate the trigonometric functions based on the first few terms of their power-series expansions. For small enough angles (< 100), cos is approximately 1.sin is approximately  Accumulated error control Estimate the error in x’ and y’ at each step Reset object positions when the error accumulation becomes too great

Reflection A transformation produces a mirror image of an object. Axis of reflection A line in the xy plane A line perpendicular to the xy plane The mirror image is obtained by rotating the object 1800 about the reflection axis. Rotation path Axis in xy plane: in a plane perpendicular to the xy plane. Axis perpendicular to xy plane: in the xy plane.

Reflection Reflection about the x axis

Reflection Reflection about the y axis

Reflection Reflection relative to the coordinate origin

Reflection Reflection of an object relative to an axis perpendicular to the xy plane through Prfl

Reflection Reflection about the line y = x

Shear The x-direction shear relative to x axis If shx = 2:

Shear The x-direction shear relative to y = yref If shx = ½ yref = -1: 1/2 3/2

Shear The y-direction shear relative to x = xref If shy = ½ xref = -1: 3/2 If shy = ½ xref = -1: 1/2 1

Transformations between Coordinate Systems x’ y’ θ y0 x’ θ x x x0

Transformations between Coordinate Systems Method 1: Method 2:

Affine Transformations A coordinate transformation of the form x’=axxx+axyy+bx, y’=ayxx+ayyy+by x’ and y’ is a linear function of the original coordinates x and y. aij and bk are constants determined by the transformation type. Translation, rotation, scaling, reflection, and shear are two-dimensional affine transformations. An affine transformation involving only rotation, translation, and reflection preserves angles and lengths.