To do rotation of an object about any selected arbitrary point P1(x1 ,y1), following sequence of operations shall be performed.
1. Translate: Translate an object so that arbitrary point P1 is moved to coordinate origin.
2. Rotate: Rotate object about origin.
3. Translate: Translate object so that arbitrary point P1 is moved back to the its original position.
Note: Here to do one operation we are doing the sequence of three operations. So it is called as composite transformation or concatenation.
Rotate about point P1(x1,y1).
1) Translate P1 to origin.
2) Rotate
3) Translate back to P1.
Equation for this composite transformation matrix form is as follows:
Here (x1,y1) are coordinates of point P1 and hence are translation factors tx and ty; we want to move P1 to origin , x1 and y1 are x and y distances to P1and hence it is translation factor.
It is demonstrated in following figure: