Page 72 - DCAP504_Computer Graphics
P. 72
Unit 6: 2-D Transformation
The figure 6.2 depicts a vector and point representation in 2-D space.
Figure 6.2: A Vector and Point Representation in 2-D
Space
A vector (i.e. V1) represents the direction and magnitude of the line and a point (i.e. X1,
Y1) represents a fixed position in 2-D space.
The points (X1, Y1) and (X2, Y2) are called the point coordinates and help to determine the position and
shape of an object in 2-D space.
Let P= (X, Y) be a point coordinate in a 2-D space. This point can be represented
in matrix form as,
X
P =
Y
A 2-D object can undergo the following transformation in a 2-D space,
1. Translation
2. Scaling
3. Reflection
4. Rotation
5. Shearing
These transformations help the graphic designer to modify the 2-D objects. The technique that the
designer has to adopt is explained in the following sub-sections.
6.1.1 Translation Transformation
Translation transformation is used to move the object within the X and Y directions of the 2-D space.
The translation matrix for 2-D transformation is given by,
d x
T=
y d
Where, d x and d y are translation values in X and Y direction.
The translation matrix is added to the point coordinate matrix of the object individually to perform
translation transformation on the object.
LOVELY PROFESSIONAL UNIVERSITY 65