A 2D coordinate
\((x_1, y_1)\) can be easily rotated by
\(\theta\) around another point
\((x_c, y_c)\) to give the new rotated point
\((x_2, y_2)\) with the equation:
\(\theta\) is positive for a counter-clockwise rotation. You may notice that the coordinate is translated as if
\((x_c, y_c)\) was the origin, the rotation transformation is applied, and then it is translated back into position.