Page 73 - DCAP504_Computer Graphics
P. 73
Computer Graphics
Let P be the point coordinate matrix and P' be the point coordinate matrix after translation. The
translation equation is given as,
P'=T+P
' x d x x
= +
' y y d y
' x + dx x
P’= =
' y y + d y
Consider a rectangular object whose point coordinates are (0, 0), (2, 0), (2, 2) and
(0, 2). The object has to be moved 2 points in X direction and 3 points in Y
direction.
The translation transformation matrix is written as,
d x 2
T= =
y d 3
The point coordinates of the rectangular object is added to the transformation
matrix individually.
i.e. point coordinate (2, 0) is represented in matrix form as,
2
P=
0
P'=T+P
2 2
P’= +
3 0
4
P’=
3
Similarly, all the respective translation transformation object points are
calculated. The point coordinates of the object after translation are (2, 3), (4, 3),
(4, 5) and (2, 5). The figure 6.3 shows the rectangular object before and after
translation by 2 points in X direction and 3 points in Y direction.
66 LOVELY PROFESSIONAL UNIVERSITY