 2D Transformations 2D Transformations  Translation Translation  Rotation Rotation  Scaling Scaling.

Slides:



Advertisements
Similar presentations
Computer Graphics: 2D Transformations
Advertisements

10.7: Rotations in the Coordinate Plane
COMPUTER GRAPHICS 2D TRANSFORMATIONS.
Gursharan Singh Tatla TRANSFORMATIONS Gursharan Singh Tatla Gursharan Singh Tatla.
Geometric Transformations
Do Now:.
1 Computer Graphics Week6 –Basic Transformations- Translation & Scaling.
Chapter 5 Geometric Transformations
Two-Dimensional 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.
CS 4731: Computer Graphics Lecture 7: Introduction to Transforms, 2D transforms Emmanuel Agu.
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 CSCE 441 Computer Graphics: 2D Transformations Jinxiang Chai.
CS Mastering 2D & 3D Computer Graphics Pipelines Introduction to 2D and 3D Computer Graphics.
Multiplication M1 v1 = v = = M1 M2 = M
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
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.
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
2D Transformations.
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.
2D Geometric Transformations
Part7: Geometric Transformations
GRAFIKA KOMPUTER ~ M. Ali Fauzi. Drawing 2 D Graphics.
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.
Computer Graphics 2D Transformations. 2 of 74 Contents In today’s lecture we’ll cover the following: –Why transformations –Transformations Translation.
1 Computer Graphics Week9 -3D Geometric Transformation.
Transformation.
Introduction to Computer Graphics Geometric Transformations
3D Transformations. Translation x’ = x + tx y’ = y + ty z’ = z + tz P = P’ = T = P’ = T. P tx ty tz xyz1xyz1 x’ y’ z’ 1 x y.
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 TRANFORMATIONS Presented By -Lakshmi Sahithi.
Transformations on the Coordinate Plane: Translations and Rotations.
2D Geometric Transformation Translation A translation is applied to an object by repositioning it along a straight-line path from one coordinate location.
Lecture 3: Introduction to 2D Graphics
Learning Objectives Affine transformations Affine transformations Translation Translation Rotation Rotation Scaling Scaling Reflection Reflection Shear.
1 By Dr. HANY ELSALAMONY.  We have seen how to create models in the 3D world. We discussed transforms in lecture 3, and we have used some transformations.
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.
w v The reflection of throughvw Reflection is a linear transformation Find a matrix M such that M = v The reflection of through y = mxv.
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. Modeling Transformations  Specify transformations for objects  Allows definitions of objects in own coordinate systems  Allows use.
학기 Chapter 5. Geometric Transformations 1.
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.
Forward Projection Pipeline and Transformations CENG 477 Introduction to Computer Graphics.
Modeling Transformations
2D TRANSFORMATIONS.
2D Transformations By: KanwarjeetSingh
2D Geometric Transformations
Computer Graphics Lecture 18 3-D Transformations-II Taqdees A
Translation Rotation Scaling
Lecture 7 Geometric Transformations (Continued)
2D Transformations y y x x y x.
Line and Character Attributes 2-D Transformation
Unit 1 Transformations in the Coordinate Plane
2D/3D Transformations User Interfaces.
CS1550 Fundamentals For Computer Graphics Transformations-2
TWO DIMENSIONAL TRANSFORMATION
Presentation transcript:

 2D Transformations 2D Transformations  Translation Translation  Rotation Rotation  Scaling Scaling

 What is transformations? ◦ The geometrical changes of an object from a current state to modified state.  Why the transformations is needed? ◦ To manipulate the initially created object and to display the modified object without having to redraw it. Back

 Translation  Rotation  Scaling 2D Transformations Back

 A translation moves all points in an object along the same straight-line path to new positions.  The path is represented by a vector, called the translation or shift vector.  We can write the components: p' x = p x + t x p' y = p y + t y  or in matrix form: P' = P + T tx tx ty ty x’ y’ xyxy txtytxty = y+ (2, 2) = 6 =4 ? Back

 A rotation repositions all points in an object along a circular path in the plane centered at the pivot point.  First, we’ll assume the pivot is at the origin.  P P’

Rotation Review Trigonometry => cos  = x/r, sin  = y/r x = r. cos , y = r.sin    P(x,y) x y r x’ y’  P’(x’, y’) r  => cos (  +  ) = x’/r x’ = r. cos (  +  ) x’ = r.cos  cos  -r.sin  sin  x’ = x.cos  – y.sin   =>sin (  +  ) = y’/r  y’ = r. sin (  +  ) y’ = r.cos  sin  + r.sin  cos  y’ = x.sin  + y.cos  Identity of Trigonometry

Rotation We can write the components:We can write the components: p ' x = p x cos  – p y sin  p ' x = p x cos  – p y sin  p ' y = p x sin  + p y cos  p ' y = p x sin  + p y cos  or in matrix form:or in matrix form: P' = R P can be clockwise (-ve) or counterclockwise (+ve as our example).  can be clockwise (-ve) or counterclockwise (+ve as our example). Rotation matrixRotation matrix  P(x,y)  x y r x’ y’  P’(x’, y’) Back

Scaling Scaling changes the size of an object and involves two scale factors, S x and S y for the x- and y- coordinates respectively. Scales are about the origin. We can write the components: p' x = s x p x p' y = s y p y or in matrix form: P' = S P Scale matrix as: P P’

Scaling If the scale factors are in between 0 and 1  the points will be moved closer to the origin  the object will be smaller. P(2, 5) P’ Example : P(2, 5), Sx = 0.5, Sy = 0.5 Find P’ ?

Scaling If the scale factors are in between 0 and 1  the points will be moved closer to the origin  the object will be smaller. P(2, 5) P’ Example : P(2, 5), Sx = 0.5, Sy = 0.5 Find P’ ? If the scale factors are larger than 1  the points will be moved away from the origin  the object will be larger. P’ Example : P(2, 5), Sx = 2, Sy = 2 Find P’ ?

Scaling If the scale factors are the same, S x = S y  uniform scaling Only change in size (as previous example) P(1, 2) P’ If S x  S y  differential scaling. Change in size and shape Example : square  rectangle P(1, 3), S x = 2, S y = 5, P’ ? What does scaling by 1 do? What is that matrix called? What does scaling by a negative value do? Back