banner.gif
On-Line Computer Graphics Notes
GENERAL ROTATION ABOUT AN AXIS


Overview

An axis in space is specified by a point $ {\bf P} $ and a vector direction $ {\vec t} $. Suppose that we wish to rotate an object about this arbitrary axis.

\includegraphics {figures/general-rotation}

We know how to do this in the cases that the axis is the x axis, the y axis, or the z axis in the Cartesian frame (these were just generalizations of the two-dimensional rotations), but the general case is more difficult. In these notes we present a solution to this problem that utilizes both translation and the above rotation matrices to accomplish this task. (One can also approach this problem through the use of frame-to-frame-conversion transformations.)

pdficonsmall.gif For a pdf version of these notes look here.


Developing the General Rotation Matrix

First assume that the axis of rotation can be specified in terms of Cartesian coordinates, i.e. can be represented by the point $ {\bf P} =(x_p,y_p,z_p)$ and the vector $ {\vec t} =<x_t,y_t,z_t>$. Then a rotation of $ \alpha$ degrees about this axis can be defined by concatenating the following transformations

The matrix representation of the general rotation is given by the product of the above transformations.

$\displaystyle T _ {(-x_p,-y_p,-z_p)} R _ {y; -\theta } R _ {x; \phi }
R _ {z; \alpha } R _ {x; -\phi } R _ {y; \theta } T _ {(x_p,y_p,z_p)}
$

These can be multiplied together (they are all $ 4 \times 4$ matrices) to give one $ 4 \times 4$ matrix which represents the general rotation.


What if the Axis was Specified in a Local Frame?

In this case, we just convert the coordinates of the point $ {\bf P} $ and vector $ {\vec t} $ defining the axis to Cartesian coordinates using the frame-to-Cartesian-frame transformation, do the above operations, and then use the Cartesian-frame-to-frame to convert the resulting coordinates back to the local system.


Summary

We have developed a simple method using only basic transformations by which general rotation can be accomplished. It utilizes translation and the basic rotations about the x axis, the y axis, and the z axis to accomplish this task. This individual matrices specified may be multiplied together to give one $ 4 \times 4$ matrix that represents the general rotation.


Return to the Graphics Notes Home Page
Return to the Geometric Modeling Notes Home Page
Return to the UC Davis Visualization and Graphics Group Home Page


This document maintained by Ken Joy

Mail us your comments

All contents copyright (c) 1996, 1997, 1998, 1999
Computer Science Department
University of California, Davis

All rights reserved.


Ken Joy
1999-12-06