Math Help - Formula For Rotating a Point about anotherPoint

1. Formula For Rotating a Point about another Point

Hi,

I need to rotate a point P1(x1,y1) about a pivot point P2(x2,y2) at an angle 'a'. What is the formula for calulating the new point?

Manu

2. Originally Posted by ManuLi
Hi,

I need to rotate a point P1(x1,y1) about a pivot point P2(x2,y2) at an angle 'a'. What is the formula for calulating the new point?

Manu
Hi

$x' = x_2 + (x_1 - x_2) \cos a - (y_1 - y_2) \sin a$
$y' = y_2 + (y_1 - y_2) \cos a + (x_1 - x_2) \sin a$

3. Originally Posted by running-gag
Hi

$x' = x_2 + (x_1 - x_2) \cos a - (y_1 - y_2) \sin a$
$y' = y_2 + (y_1 - y_2) \cos a + (x_1 - x_2) \sin a$
What running-gag did was "translate" the point $(x_2, y_2)$ to the origin (0,0) (that's the $x_1- x_2$ and $y_1-y_2$ part) then rotate about the origin, the translate back (that's why he added $x_2$ and $y_2$).

4. Originally Posted by HallsofIvy
What running-gag did was "translate" the point $(x_2, y_2)$ to the origin (0,0) (that's the $x_1- x_2$ and $y_1-y_2$ part) then rotate about the origin, the translate back (that's why he added $x_2$ and $y_2$).
Thanks, my "explanation" was a little bit short