2D Point Rotation
From CGAFaq
In 2D, the rotated point is computed
from the original point
with a rotation by angle
by
(Note that this describes a rotation in the counter-clockwise direction. For a clockwise rotation, can be negated.)
As a matrix this is very simple. If you want to rotate a
column vector
by
degrees using matrix
, use
so that .
If you have a row vector, use the transpose of (turn rows into
columns and vice versa).
If you want to combine rotations, in 2D you can just add their angles, but in higher dimensions you must multiply their matrices.

