Professional Documents
Culture Documents
Transformari geometrice
elementare
Transformarea de vizualizare
de coordonate 3D
Transformari 3D
Transformri elementare
Translaia: xt = x + a , yt = y + b
1 0 0
y 1 0 1 0 xa
a b 1
y b 1 xt
Scalarea: xt = xa , yt = y b
a 0 0
y 1 0 b 0 ax by 1 x'
0 0 1
y' 1
yt 1
Transformri elementare
Deformarea (forfecarea): xt = x + ay , yt = y + bx
1 b 0
y 1 a 1 0 x ay
0 0 1
y bx 1 x t
yt 1
Simetria: xt = - x , yt = - y
1 0 0
0 1 0
0 0 1
1 0 0
S Y 0 1 0
0 0 1
SO
1 0 0
0 1 0
0 0 1
Transformri elementare
Y
t
Mt (x , y )
(xt
yt
1) ( x
cos
y 1) sin
0
sin
cos
0
0
0
1
M (x,y)
X
Compunerea transformrilor 2D
O transformare compus const ntr-o succesiune de transformri
elementare executate ntr-o anumit ordine.
Matricea transformrii compuse este produsul matricelor transformrilor
elementare componente
A B 1
C D 1
a
b 1
T T 1 I
Transformarea de vizualizare
xe x ax bx
ye y ay by
vr vl
vl ( wr wl ) wl (vr vl )
ax
, bx
,
wr wl
wr wl
vt vb
vb( wt wb) wb(vt vb)
ay
, by
.
wt wb
wt wb
Transformarea de vizualizare
Spaiul utilizator
(wl,wt)
fereastr
(wr,wb)
Transformarea de vizualizare
Spaiul ecran
(vl,vt)
Vizorul
(vr,vb)
Transformarea de vizualizare
x wl
xe vl
wr wl vr vl
y wb
ye vb
wt wb vt vb
wt wb vt vb
wr wl vr vl
Etape:
translaia centrului de rotaie n
originea axelor
rotaia n jurul originii n sens
trigonometric cu unghiul
translaia rezultatului la centrul de
rotaie iniial.
1
y 1 0
0
1
0 cos
0 sin
a b 1
Pt (x , y )
P(x, y)
M (a,b)
X
sin
cos
0
0 1 0 0
0 0 1 0 x' y ' 1
1
a b 1
Clasa Graphics