Lecture 9

  • November 2019
  • PDF

This document was uploaded by user and they confirmed that they have the permission to share it. If you are author or own the copyright of this book, please report to us by using this DMCA report form. Report DMCA


Overview

Download & View Lecture 9 as PDF for free.

More details

  • Words: 480
  • Pages: 4
Types of transformations

Chapter 5: 2-D Geometric Transformations Translation, Scaling & Rotation

    

Translation 



A translation is applied to an object by repositioning it along a straight line path from one coordinate location to another. This is done by adding translation distances tx and ty to the original coordinate position (x,y) to move it to a point (x’,y’).  

x’ = x + tx & y’ = y + ty (tx,ty) is called ad the translation vector or shift vector

Translation. Scaling. Rotation. Reflection. Shearing.

Translation 

Translation can be represented as a single matrix:  



P’ = P + T P = [x y]T , P’ = [x’ y’]T , T = [tx ty]T

Translation is a rigid body transformation that moves the body without any deformation. That is, every point on the object is translated by the same amount

1

P’ T P

5 10 15 20 25 30 35 40

Object translation

5 10 15 20 25 30 35 40

Point translation

5 10 15 20 25 30 35 40

5 10 15 20 25 30 35 40

A similar method can be used to translate objects

Translation of other objects 

What about translating circles and ellipses? 

   

Rotation 

You should know the answer ……..

. . . Translate the center coordinates and redraw the figure in the new location.



A 2D rotation is applied to an object by repositioning it along a circular path in the xy plane. To generate a rotation, we specify:  



Rotation angle θ and A Rotation/pivot point. The point about which the object is to be rotated.

Positive values of θ define counter clockwise rotation and negative values of θ define clockwise rotation.

2

Rotation P’

θ

Derivation of the rotation matrix

P

Rotation is also a rigid body transformation

Scaling 





Scaling transformation alters the size of an object. This is done by multiplying the coordinate values (x,y) of each vertex of a polygon by scaling factors sx and sy to get transformed coordinates (x’,y’): x’ = x.sx & y’ = y.sy

Scaling 

  

sx scales in the x-direction and sy scales in the y-direction. Values < 1, reduces the size of the object Values > 1, increases the size of the object Value = 1, no change in the size of the object

3

Effect of the scaling factors     

sx = sy  uniform scaling. sx > sy  resize more in the x-direction. sy > sx  resize more in the y-direction. sx = sy = 1, no scaling. Objects are scaled as well as repositioned.  

If we scale down, the object moves towards the origin. If we scale up, the object moves away from the origin.

4

Related Documents

Lecture 9
November 2019 15
Lecture 9
May 2020 9
Lecture 9
November 2019 14
Lecture 9
November 2019 16
Lecture 9
October 2019 22
Lecture 9
November 2019 12