banner.gif
On-Line Computer Graphics Notes
DEVELOPING A GENERAL ROTATION
BY USING FRAMES


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, which are just generalizations of the two-dimensional rotations, but the general case is more difficult.

We present two methods to approach this problem. Here we present a solution based upon frame conversion. One can also approach the problem directly by using translation and rotation transformations


Specifying a Frame on the Axis.

The general idea here is to establish a frame on the axis. That is, define a frame $ {\cal F} =( {\vec u} , {\vec v} , {\vec w} , {\bf O} )$ where the point $ {\bf P} $ is the origin $ {\bf O} $ of the frame, and the vector $ {\vec t} $ is one of the vectors defining the frame. Then transform this frame to the Cartesian frame, do the rotation in the Cartesian frame about the appropriate axis, and transform back

More specifically, we establish a frame $ {\cal F} =( {\vec u} , {\vec v} , {\vec w} , {\bf O} )$ as follows:

We note that this frame is orthogonal - that is, all vectors are mutually perpendicular.

Now let $ F$ be the frame-to-Cartesian-frame, conversion transformation. Then we can perform the general rotation by the following transformation

$\displaystyle F R_{z;\alpha} F^{-1}
$

which transforms the constructed frame to the Cartesian frame, rotates about the $ z$ axis and then transforms back to the constructed frame. The resulting matrix will perform the desired rotation on the object.


What if the Axis was Specified in a Local Coordinate System?

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.


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