2D Geometric Transformation Translation A translation is applied to an object by repositioning it along a straight-line path from one coordinate location.

Slides:



Advertisements
Similar presentations
COMPUTER GRAPHICS 2D TRANSFORMATIONS.
Advertisements

Gursharan Singh Tatla TRANSFORMATIONS Gursharan Singh Tatla Gursharan Singh Tatla.
Geometric Transformations
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
HCI 530 : Seminar (HCI) Damian Schofield. HCI 530: Seminar (HCI) Transforms –Two Dimensional –Three Dimensional The Graphics Pipeline.
Linear Algebra and SVD (Some slides adapted from Octavia Camps)
CS 4731: Computer Graphics Lecture 7: Introduction to Transforms, 2D transforms Emmanuel Agu.
1 CSCE 441 Computer Graphics: 2D Transformations Jinxiang Chai.
Computer Graphics with OpenGL 3e
2D Transformations x y x y x y. 2D Transformation Given a 2D object, transformation is to change the object’s Position (translation) Size (scaling) Orientation.
2D Transformations Unit - 3. Why Transformations? In graphics, once we have an object described, transformations are used to move that object, scale it.
CAP4730: Computational Structures in Computer Graphics
CS 450: Computer Graphics 2D TRANSFORMATIONS
Circle Drawing algo..
UNIT - 5 3D transformation and viewing. 3D Point  We will consider points as column vectors. Thus, a typical point with coordinates (x, y, z) is represented.
Polar Coordinates and Graphs of Polar Equations. Copyright © by Houghton Mifflin Company, Inc. All rights reserved. 2 The polar coordinate system is formed.
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
2D Transformation of Graphics
Lecture 3 Transformations.
Dx = 2 dy = 3 Y X D Translation A translation is applied to an object by repositioning it along a straight-line path.
Part7: Geometric Transformations
 2D Transformations 2D Transformations  Translation Translation  Rotation Rotation  Scaling Scaling.
Geometric Transformations
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
1 Computer Graphics Week9 -3D Geometric Transformation.
Perform Congruence Transformations. A __________________ is an operation that moves or changes a geometric figure to produce a new figure called an __________.
Introduction to Computer Graphics Geometric Transformations
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
GEOMETRIC TRANFORMATIONS Presented By -Lakshmi Sahithi.
Lecture 3 Transformations. 2D Object Transformations The functions used for modifying the size, location, and orientation of objects or of the camera.
Transformations on the Coordinate Plane: Translations and Rotations.
CSCE 552 Fall 2012 Math By Jijun Tang. Applied Trigonometry Trigonometric functions  Defined using right triangle  x y h.
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.
Jinxiang Chai CSCE441: Computer Graphics 3D Transformations 0.
1 Teaching Innovation - Entrepreneurial - Global The Centre for Technology enabled Teaching & Learning, N Y S S, India DTEL DTEL (Department for Technology.
MATH 1330 Section 4.3 Trigonometric Functions of Angles.
Computer Graphics Lecture 11 2D Transformations I Taqdees A. Siddiqi
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.
CSCE 441 Computer Graphics: 2D Transformations
Transformations. Transformations Introduce standard transformations ◦ Rotation ◦ Translation ◦ Scaling ◦ Shear Derive homogeneous coordinate transformation.
Instructor: Dr. Shereen Aly Taie Basic Two-Dimensional Geometric Transformation 5.2 Matrix Representations and Homogeneous Coordinates 5.3 Inverse.
Copyright © Cengage Learning. All rights reserved. Polar Coordinates and Parametric Equations.
Forward Projection Pipeline and Transformations CENG 477 Introduction to Computer Graphics.
CPT450 – Computer Graphics
Computer Graphics 2D Transformations
Lecture 5 Basic geometric objects
2D TRANSFORMATIONS.
2D Transformations By: KanwarjeetSingh
Computer Graphics CC416 Week 15 3D Graphics.
Computer Graphics 3D Transformations
2D Transformations y y x x y x.
Line and Character Attributes 2-D Transformation
Rotations.
Copyright © Cengage Learning. All rights reserved.
Transformations Day 1 Notes Slideshow.
2D/3D Transformations User Interfaces.
TWO DIMENSIONAL TRANSFORMATION
Presentation transcript:

2D Geometric Transformation Translation A translation is applied to an object by repositioning it along a straight-line path from one coordinate location to another. We translate a two-dimensional point by adding translation distances, tx and ty to the original coordinate position (x, y) to move the point to a new position ( x ', y') x' = x + tx, y' = y + ty The translation distance pair (tx, ty) is called a translation vector or shift vector.

Translation is also represented by single matrix equations as P’ = P + T where P= X1 P’ = X1’ T = Tx X2 X2’ Ty To change the position of curves like Circle or Ellipse we translate the center coordinates and redraw figure at new location.

Rotation A two-dimensional rotation is applied to an object by repositioning it along a circular path in the xy plane. To generate a rotation, we specify a rotation angle (Ɵ ) theta and the position (xr, yr) of the rotation point (or pivot point) about which the object is to be rotated. Positive values for the rotation angle define counterclockwise rotations about the pivot point and negative values rotate objects in the clockwise direction.

We first determine the transformation equation for rotation of point P when the pivot point is at origin. The original coordinates of point in polar coordinates are x = r cos ɸ, y = r sin ɸ Using standard trigonometric identities we can express the transformed coordinates in terms of angle and as X’ = r cos (ɸ + Ɵ) = r cosɸ cosƟ – r sinɸsinƟ Y’ = r sin (ɸ + Ɵ) = r cosɸ sinƟ + r sinɸcosƟ

Substituting the values from previous equations we have X’ = x cosƟ – ysinƟ Y’ = x sinƟ + ycosƟ We can also write the rotation eqautions in matrix form as P’ = R. P Where R= cosƟ – sinƟ sinƟ cosƟ

In case when coordinates are represented ad row vectors instead of column vectors translation can be represented as P[x’, y’] = P [x, y] + T[tx, ty] Rotation can be represented as P’ t = [R. P] t P’ t = P t. R t Where P t [x, y] and R t can be obtained by interchanging rows and columns.

Now we will consider the rotation of point P (x, y) about an arbitrary pivot point (xr, yr ) then we can obtain the point P’ (x’, y’) as X’ = x r + (x – x r ) cosƟ – (y – y r )sinƟ Y’ = y r + (x – x r ) sinƟ + (y – y r ) cosƟ

SCALING A scaling transformation alters the size of an object. This operation can be carried out for polygons by multiplying the coordinate values (x, y) of each vertex by scaling factors s x and s y to produce the transformed coordinates (x', y'): x’ = x. s x And y’ = y. s y Scaling factor s x scales objects in the x direction, while s y scales in the y direction.

Transformation equations can also be written in matrix form as P’ = S. P Where P’ = x’ P = x S = s x 0 y’ y’ 0 s y Assigning value less than 1 to scaling factors reduces the size of object, value greater the 1 increases the size of object

When scaling factors are assigned same values then uniform scaling is produced that maintains relative object proportions. Unequal values of scaling factors result in differential scaling. Scaling factors with values less than 1 moves object closer to the coordinate origin values greater than 1 moves object farther from origin.

We can control the location of the scaled object by choosing a position, called the fixed point that is to remain unchanged after the scaling transformation. Let the coordinates of fixed point be(x f, y f ) then we can obtain the transformation eq. as x’ = x f + (x - x f )s x and y’ = y f + (y - y f )s y we can rewrite these equations as x’ = x. s x + x f (1 – s x ) and y’ = y. s y + y f (1 – s y ) Where the additive terms x f (1 – s x ) and y f (1 – s y ) are constants for all points in the object.