banner.gif
On-Line Computer Graphics Notes
FRAMES


Overview

In computer graphics we manipulate objects which may include light sources, cameras, and models in our scenes. Each of these is likely to be defined in its own coordinate system and then placed within the scene we are modeling. We must be able to relate these coordinate systems, both to a global coordinate system and to each other. We place coordinate systems into an affine space through the use of frames.

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


Definition of a Frame

Let $ {\cal A} $ be an affine space of dimension $ n$. Let $ {\bf O} $ be a point in this space and let $ {\vec v} _1, {\vec v} _2, ..., {\vec v} _n$ be any basis for $ {\cal A} $. We call the collection $ {\cal F} = ( {\vec v} _1, {\vec v} _2, ..., {\vec v} _n, {\bf O} )$ a frame for $ {\cal A} $. Frames form coordinate systems in our affine space: If we are given a point $ {\bf P} $, then it can be written as $ {\bf O} +
{\vec v} $, where $ {\bf O} $ is the origin of the frame and $ {\vec v} $ is a vector. Since $ {\vec v} _1, {\vec v} _2, ..., {\vec v} _n$ forms a basis for $ {\cal A} $, the vector $ {\vec v} $ can be written uniquely as

$\displaystyle {\vec v} \: = \: c_1 {\vec v} _1 + c_2 {\vec v} _2 + \cdots + c_n {\vec v} _n
$

and so the point $ {\bf P} $ can be written uniquely as

$\displaystyle {\bf P} \: = \: c_1 {\vec v} _1 + c_2 {\vec v} _2 + \cdots + c_n {\vec v} _n + {\bf O}
$

The set of values $ (c_1, c_2, ..., c_n)$ are the coordinates of $ {\bf P} $ relative to the frame $ {\cal F} $.


Examples of Frames

Two-dimensional examples of frames are fairly straightforward to produce. These frames contain two vectors and a point representing the origin of the frame. The vectors form a basis for the vector space of all two-dimensional vectors.


Matrix representation of Points and Vectors

Points and vectors can be uniquely identified by the coordinates relative to a specific frame. Given a frame $ ( {\vec v} _1, {\vec v} _2, ..., {\vec v} _n, {\bf O} )$ in an affine space $ {\cal A} $, we can write a point $ {\bf P} $ uniquely as

$\displaystyle {\bf P} \: = \: c_1 {\vec v} _1 + c_2 {\vec v} _2 + \cdots + c_n {\vec v} _n + {\bf O}
$

This can also be written in matrix notation as

$\displaystyle {\bf P} \: = \:
\left[
\begin{array}{ccccc}
c_1 & c_2 & \cdots & ...
... _1 \\  {\vec v} _2 \\  \vdots \\  {\vec v} _n \\  {\bf O}
\end{array}\right]
$

Similarly, since the vectors of our affine space form a vector space, we can write a vector $ {\vec v} $ uniquely as

$\displaystyle {\vec v} \: = \: c_1 {\vec v} _1 + c_2 {\vec v} _2 + \cdots + c_n {\vec v} _n
$

which can be written as

$\displaystyle {\bf P} \: = \:
\left[
\begin{array}{ccccc}
c_1 & c_2 & \cdots & ...
... _1 \\  {\vec v} _2 \\  \vdots \\  {\vec v} _n \\  {\bf O}
\end{array}\right]
$

Thus, points are represented as row vectors whose last component is $ 1$ and vectors are represented as row vectors whose last component is 0 (zero).


Bibliography

1
DEROSE, T.
Coordinate-free geometric programming.
Technical Report 89-09-16, Department of Computer Science and Engineering, University of Washington, Seattle, Washington, 1994.


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