Sunteți pe pagina 1din 9

Two Dimensional Transformation

Translation (Drag)
Rotation about origin (rotation)
Scaling (Zoom)

Translation
Y

Object

Object

X
x = x + dx
y = y + dy

Rotation

P (x,y)

r
P (x, y)

x = r cos(+)
Y = r sin(+)
3

Scaling
y

P (x, y)

P (x, y)

x
X = Sx.x
Y = Sy.y

Homogeneous Co ordinates

Pivot Point operation


The steps are :
Translate the object such that the pivot point
coincides with the origin.
Perform the required operation about the origin.
Translate the object such that the pivot point
comes back to the original position.

Reflection

Reflection about X-axies


P(x,y)

X = x
Y = - y

P (x,y)

Reflection about Y-axies


P(x.Y)

P(x,y)

X = -x
Y = y

S-ar putea să vă placă și