Professional Documents
Culture Documents
2D Transformations
2D Transformations
2D Transformations
-aS
y-aS
Basic tamsfoations
kornations Ci) Trams latin (Chamgng on obiect's
poslbin)
Cientatim CRotabon) omd
C3) stze Csalng)
other tomsformatioms:
Reftechien omd
Sheanng operations
Tyanslaton :
;Pay')
ty
a=t t
PC,y
y'=y+by
ty’ tonslab'onal distomee along
alang L-a's
tx
T=
ty
Mabix torm: p= P+ T
QD TYmslatin
move a ine
ne segment, apply he tonstovmatinm
to each of the two Line end points amd edoaw the ine
between hew endpoints
To move
to
polygon, apply the tamsformatim eguatom
co-ordhates of each vestex and
vegenevale the
polygon using the mew set of vextee
Co-oodinates.
Example
P=
P -
[3-C1-(:]
C1,29|
2
Polygen A (2,5)
B(7,10)
Cio,2)
2
or A,
y 5+2-7
=xtta
Tor B,
y'= l0+ 2 J2
3 cach
to siy
new
the
formula
rotation
the
p'cy)pCzy)
formula
otaban
the polygon
deformation.
without bekween
the
nethe Sin)
vedsauing
SinG CoSe Cose-ysi
Sine
-y tc'
vedaoingapplyòng
2 obíecksaplying
iects amd -Cos«
=
and by co-odnates. oso
2
l0+ 224 nove
also by
Rotat'ons rotatedveles
points
- y'=y+tx tated
ttz points.io the X
Cas(B+o) a'
o end Vevtez Sind
=
Rotation:
2D lne of =
the oCos
end each
A t mew
Matietorm:
R= os )y=
30'Sin =
30
P=R-P Sin 9= =
Sin COSOSin =
2 V3
r(Sin
7
Sin9 Sin(o+o)
Coso
R= Sino c
oseStn-Sin&Cos Cos Cosx
tyose +
Sin8
ose -SinCos +
y
rCos99in Cos0
Coso
(2x)
(2x2)
Sin
d)
-|2
2-23 O-36
6)
pC413) angle ys
3
4
Sin 45
3 7
4 Sln4s
= 3Cos45t
ap scaling
used to alter the size of an obiect
Scaling is
Simple 20 saling e pefomed by mudtipgng
objeck pasitins Cay by scoling factos by ond sy
of am objedt
siz
Example:
P=
NoTE!"
C+,t)
Cbcfoe veftectin)
y'y
Matiz fo:
O Cafter veflctin
P= P R
C-it)
Ctt)
(hefore Cafter
nftectin) efeton)
(*y']:
9 Retechon atout Ongtn
Cbefore
reflechion) Cafter veflechim)
Vateom: Ca'
alp'= P. Ray
Cov)
p' P. Ro.
line
Step 3:
45
Rez'
|Cas 45 -Sin 45 7
Smys os 45
R.R
-45 45
Cxy)
arn d
L
eflecti'on about yzmdtb lne
Translate the lone y mztb so that he line pases fhrough
he origin.
2: Perform otathim otth an
ang le (o)
step H: ferfon ohtim tth am amgle (-0).
seps: Perfovm evese thanslat'on.
Shear tamsfomatim
the shape ef object
2-shear y-shea ty-shear
X-shear..
Reseme y ales, chame values.
p': ey)
y'
Mabne Representation
’ Each of the three basi Dtransformati ons Can b
expressed in the genel m
shix form
p'
M,. P+ Ma
oith Pomd Pl
epresented as colu mn
vecors
M, is a
M is a two-element olmm mgin
lontalnig
tomslatimel tenms
’ for tamslation, M, is the matie
for otatim (ov) saling, M, ontns the tamslahimal
terms assoaate d with the pivot point or sang fad
polut
Moqeheous Coodinaes: (3)
where
foy Translatin:
x': x t
P': P.T
(o)
10t
by
for Rotetin
x osO- y 5in
y' xsin6+ y Cose
(c'y') = (2c y )Gass Sino
- Sin o
Cos
(or)
rCose -Sin9
+ Sin& Cos 9
RCe). P
for Galaug
Sx
Co
ngeneous Coorelinates (15)
ta2, ty 20
T=
t 2 , ty =5
T
Imerse tmsfommatims
tramslatim, we obtan the (nvese mati
to
negabing the tomslation dstees.
-by
This
produes atamslation tn the opposite direchion,an4
the proda ct of a tamslatin mtrin amd its invese podas
the idety matie
Tnvese Rotatm
Reqlau omgle by #ncgaliw
Cose Sino
-Sin Coso
R RT