Ejemplo de rotación respecto al origen
Queremos rotar un punto P = (3, -1) en un ángulo de 45° respecto al origen en (0, 0). ¿Donde terminará el punto?
Datos
\begin{equation} \begin{gathered} P = (3, -1) \\ \theta = 45^\circ \\ P' = (?, ?) \\ \end{gathered} \end{equation}
Procedimiento
Convertimos las coordenadas en un vector renglón de coordenadas homogéneas, y obtenemos la matriz de rotación según el ángulo dado.
\begin{align} P = \begin{bmatrix} 3 & -1 & 1 \end{bmatrix}, \quad R = \begin{bmatrix} \cos(45) & \sin(45) & 0 \\ -\sin(45) & \cos(45) & 0 \\ 0 & 0 & 1 \end{bmatrix} \end{align}
Llevamos a cabo la multiplicación para obtener el vector de P'.
\begin{equation} \begin{gathered} P' = PR = \begin{bmatrix} 3 & -1 & 1 \end{bmatrix} \begin{bmatrix} \cos(45) & \sin(45) & 0 \\ -\sin(45) & \cos(45) & 0 \\ 0 & 0 & 1 \end{bmatrix} = \\ \begin{bmatrix} 3\cos(45) + \sin(45) + 0 & 3\sin(45) - \cos(45) + 0 & 0 + 0 + 1 \end{bmatrix} = \begin{bmatrix} 2.83 & 1.41 & 1 \end{bmatrix} \end{gathered} \end{equation}
Resultado
\begin{equation} P' = (2.83, 1.41) \end{equation}