Introduction to Graphics Math

Rotation Matrix

A: ()
B: ()
x: (1.000,0.000)
y: (0.000,1.000)
\(\theta\): 0.000\(^{\circ}\)

To construct a rotation matrix we use trigonometic equations for a unit circle. If x represents a point at an angle \(\theta\) around a unit circle, then it will equal: \[\textbf{x}=(cos\ \theta, sin\ \theta)\] To get a vector perpendicular to it, we flip the x and y values and negate x: \[\textbf{y}=(-sin\ \theta, cos\ \theta)\] Then we can put it into a matrix and use it to transform A into B: \[\textbf{B}=\textbf{A} \cdot \begin{bmatrix}cos\ \theta & sin\ \theta \\ -sin\ \theta & cos\ \theta\end{bmatrix}\] \[ = A_x \textbf{x} + A_y \textbf{y}\] \[ = 1.0 \cdot (1.000,0.000) + 3.0 \cdot (0.000,1.000)\] \[ = \underline{\underline{(1.000,3.000)}}\]