Lecture 9

Download as pdf or txt
Download as pdf or txt
You are on page 1of 4

Types of transformations

Chapter 5: 2-D Geometric


 Translation.
Transformations  Scaling.
 Rotation.
Translation, Scaling & Rotation
 Reflection.
 Shearing.

Translation Translation
 A translation is applied to an object by  Translation can be represented as a single
repositioning it along a straight line path from matrix:
one coordinate location to another.  P’ = P + T
 This is done by adding translation distances  P = [x y]T , P’ = [x’ y’]T , T = [tx ty]T
tx and ty to the original coordinate position  Translation is a rigid body transformation that
(x,y) to move it to a point (x’,y’). moves the body without any deformation.
 x’ = x + tx & y’ = y + ty That is, every point on the object is translated
 (tx,ty) is called ad the translation vector or shift by the same amount
vector

1
Point translation Object translation

5 10 15 20 25 30 35 40

5 10 15 20 25 30 35 40
P’

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 Rotation


 What about translating circles and ellipses?  A 2D rotation is applied to an object by
 You should know the answer …….. 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
 Translate the center coordinates and redraw object is to be rotated.
the figure in the new location.  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
 Scaling transformation alters the size of an  sx scales in the x-direction and sy scales in
object. the y-direction.
 This is done by multiplying the coordinate  Values < 1, reduces the size of the object
values (x,y) of each vertex of a polygon by  Values > 1, increases the size of the object
scaling factors sx and sy to get transformed  Value = 1, no change in the size of the object
coordinates (x’,y’):
 x’ = x.sx & y’ = y.sy

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.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy