Rotation about a pivot point

Actually, we can specify a rotation angle a1 and the position (xr, yr)of rotation point (or pivot point) about the object is to be rotated.

That mean, we can control the location of a rotated object .

Rotation about a fixed point (xf, yf) :

x'= xf + (x- xf)*cos(a2) - (y-yf)*sin(a2)
y' = yf + (x- xf)*sin(a2) + (y-yf)*cos(a2)

Rotation about a fixed point (5, 3 )

For example:

The new position of point (4,3) with rotation angle=30 degree and pivot point = (5, 3 ) :

x' = 5+ (4-5)*cos(30) - (3-3)*sin(30) = 4.13 --> 4
y' = 3+ (4-5)*sin(30) + (3-3)*cos(30) = 2.5 --> 2

 

Let's try by using pen and graph paper!