6.3.1. Rotation of a PointΒΆ

See also

This YouTube Video by Peter Corke discusses rotation of points.

Rotation of points is an important topic to both machine vision and robotics. Pixels in an image might be rotated to align objects with a model. After describing rotation of a point, we can extend the concept of a rotation matrix to transformations consisting of both rotation and translation. We then consider transformations of coordinate frames that are used to describe the pose of robots and moving parts.

Here, we only consider rotating points about the origin. Rotation about other points is an extension of rotation about the origin.

Point \mathbf{p} = (a, b) is rotated by an angle \theta about the origin to point \mathbf{p}' = (a', b').

../../_images/rotate1.png

To facilitate the discussion, the point \mathbf{p} is defined in terms of unit vectors \bm{\hat{x}} = (1, 0) and \bm{\hat{y}} = (0,
1). The new location, \mathbf{p}' is then defined by unit vectors \bm{\hat{x'}} and \bm{\hat{y'}} formed by rotating \bm{\hat{x}} and \bm{\hat{y}} by the angle \theta.

\begin{array}{rl}
\mathbf{p} &= a\,\bm{\hat{x}} + b\,\bm{\hat{y}} \\ \hfill \\
\mathbf{p}'&= a\,\bm{\hat{x'}} + b\,\bm{\hat{y'}}
\end{array}

../../_images/rotate2.png

\bm{\hat{x'}} = \bm{\hat{x}}\,\cos\theta
          + \bm{\hat{y}}\,\sin\theta \\ \\
\bm{\hat{y'}} = -\bm{\hat{x}}\,\sin\theta + \bm{\hat{y}}\,\cos\theta

\mathbf{p}' = \bm{\hat{x}}(\,a\,\cos\theta - b\,\sin\theta\,)
+ \bm{\hat{y}}(\,a\,\sin\theta + b\,\cos\theta\,)

Expressed in matrix notation:

\begin{array}{rl}
  \mathbf{p}' &= \spalignmat{\bm{\hat{x}}, \bm{\hat{y}}}
        \spalignmat[r]{\cos\theta, -\sin\theta;
                    \sin\theta,  \cos\theta}
        \spalignvector{a; b} \\ \\
     &= \spalignmat{1, 0; 0, 1}
        \spalignmat[r]{\cos\theta, -\sin\theta;
                    \sin\theta,  \cos\theta}
        \spalignvector{a; b} \\ \\
     &= \spalignmat[r]{\cos\theta, -\sin\theta;
                    \sin\theta,  \cos\theta}
        \spalignvector{a; b}
\end{array}

Thus, we have a 2{\times}2 rotation matrix, which when multiplied by the coordinates of a point yields the coordinates of the rotated point.

\mathbf{R}(\theta) = \spalignmat[r]{\cos\theta, -\sin\theta;
\sin\theta, \cos\theta}

The rotation matrix has the following special properties.

  1. The columns define bases vectors for the rotated coordinate frame.
  2. The matrix is orthogonal (square with unit length, orthogonal columns).
  3. \mathbf{R}(\theta)^{-1} = \mathbf{R}(-\theta)
= \mathbf{R}^{T}(\theta).
  4. The determinant, det(\mathbf{R}(\theta)) = 1, \; \forall \theta, thus \bf{R} is never singular.