Consider the following 3D triangle,
![$\displaystyle ((x_1,y_1,z_1), (x_2,y_2,z_2), (x_3,y_3,z_3)) ,$](img170.gif) |
(3.2) |
in which its vertex coordinates are expressed as generic constants.
Let
,
, and
be the amount we would like to change the triangle's position, along the
,
, and
axes, respectively. The operation of changing position is called translation, and it is given by
![\begin{displaymath}\begin{array}{l} (x_1,y_1,z_1) \mapsto (x_1+x_t, y_1+y_t, z_1...
...(x_3,y_3,z_3) \mapsto (x_3+x_t, y_3+y_t, z_3+z_t) , \end{array}\end{displaymath}](img172.gif) |
(3.3) |
in which
denotes that
becomes replaced by
after the transformation is applied. Applying (3.3) to every triangle in a model will translate all of it to the desired location. If the triangles are arranged in a mesh, then it is sufficient to apply the transformation to the vertices alone. All of the triangles will retain their size and shape.
Figure 3.4:
Every transformation has two possible interpretations, even though the math is the same. Here is a 2D example, in which a triangle is defined in (a). We could translate the triangle by
and
to obtain the result in (b). If we instead wanted to hold the triangle fixed but move the origin up by
in the
direction and
in the
direction, then the coordinates of the triangle vertices change the exact same way, as shown in (c).
![\begin{figure}\begin{center}
\begin{tabular}{ccc}
\psfig{file=figs/2dshift1.eps,...
...& (b) Object moves & (c) Origin moves \\
\end{tabular}\end{center}
\end{figure}](img174.gif) |
Steven M LaValle
2020-11-11