written 8.6 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
![enter image description here](https://i.imgur.com/Cw06Fl8.png)
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.
![enter image description here](https://i.imgur.com/Yj4XXVX.png)
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
![enter image description here](https://i.imgur.com/axrk0KD.png)
![enter image description here](https://i.imgur.com/CG68DOD.png)
This transformation matrix is the overall transformation matrix for rotation about arbitrary point (Xm, Ym) by an angle θ in anticlockwise direction.