Note that when OP rotates to OP' by an angle ALPHA, so do X (base of triangle), and Y.

So we can find using geometry the transformation rules for rotation

(that is how the coordinates of P' relate to the coordinates of P):

 

X'= X COS (ALPHA) - Y SIN (ALPHA)

Y'= X SIN (ALPHA) + Y COS (ALPHA)

 

or if we want to write it as:

 

X'= A X + B Y

Y'= C X + D Y

then:

A=COS (ALPHA)

B=-SIN (ALPHA)

C=+SIN (ALPHA)

D=COS (ALPHA)

 

Note that A=D, B=-C