written 8.4 years ago by |
Transformation means change in image.
We can modify the image by performing some basic transformation such as.
Scaling.
Rotation.
Translation.
Rotation:
For rotation we need trigonometry logic. Suppose we have point P1 = (x1, y1) and we rotate it about the original by an angle θ to get a new position P2 = (x2, y2) as shown in figure 16
Rotation about arbitrary point:
Suppose the reference point of rotation is other than origin, then in that case we have to follow series of transformation.
Consider figure 17, assume that we have to rotate a point P1 with respect to (Xm, Ym) then we have to perform three steps.
I) Translation: First we have to translate the (Xm, Ym) to origin as shown in figure 18. Translation matrix (T1) will become
This transformation matrix is the overall transformation matrix for rotation about arbitrary point (Xm, Ym) by an angle θ in anticlockwise direction.