banner.gif
On-Line Computer Graphics Notes
TRANSLATION


Overview

Translation is one of the simplest transformations. A translation moves all points of an object a fixed distance in a specified direction. It can also be expressed in terms of two frames by expressing the coordinate system of object in terms of translated frames.

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


Development of the Transformation in Terms of Frames

Translation is a simple transformation. We can develop the matrix involved in a straightforward manner by considering the translation of a single frame. If we are given a frame $ {\cal F} =( {\vec u} , {\vec v} , {\vec w} , {\bf O} )$, a translated frame would be one that is given by $ {\cal F} '=( {\vec u} , {\vec v} , {\vec w} , {\bf O} ')$ - that is, the origin is moved, the vectors stay the same.

If we write $ {\bf O} '$ in terms of the previous frame by

$\displaystyle {\bf O} ' = a {\vec u} + b {\vec v} + c {\vec w} + {\bf O}
$

then we can write the frame $ {\cal F} '$ in terms of the frame $ {\cal F} $ by

$\displaystyle \left[
\begin{array}{cccc}
1 & 0 & 0 & 0 \\
0 & 1 & 0 & 0 \\
...
...ray}{c}
{\vec u} \\
{\vec v} \\
{\vec w} \\
{\bf O} '
\end{array}\right]
$

So a $ 4 \times 4$ matrix implements a frame-to-frame transformation for translated frames, and any matrix of this type (for arbitrary $ a,b,c$) will translate the frame $ {\cal F} $. We call any matrix

$\displaystyle T_{a,b,c} \: = \:
\left[
\begin{array}{cccc}
1 & 0 & 0 & 0 \\
0 & 1 & 0 & 0 \\
0 & 0 & 1 & 0 \\
a & b & c & 1 \\
\end{array}\right]
$

a translation matrix and utilize matrices of this type to implement translations.


Applying the Transformation Directly to the Local Coordinates of a Point

Given a frame $ {\cal F} = ( {\vec u} , {\vec v} , {\vec w} , {\bf O} )$ and a point $ {\bf P} $ that has coordinates $ (u, v, w)$ in $ {\cal F} $, if we apply the transformation to the coordinates of the point we obtain

$\displaystyle \left[
\begin{array}{cccc}
u & v & w & 1
\end{array}\right]
\left...
... = \:
\left[
\begin{array}{cccc}
u + a & v + b & w + c & 1
\end{array}\right]
$

That is, we can translate the point within the frame $ {\cal F} $. An illustration of this is shown in the following figure

\includegraphics {figures/translating-the-point}


Summary

Translation is a simple transformation that is calculated directly from the conversion matrix for two frames, one a translate of the other. The translation matrix is most frequently applied to all points of an object in a local coordinate system resulting in an action that moves the object within this 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