next up previous
Next: 4.2 Scalar treatment Up: 4 Surface Normal Vector Previous: 4 Surface Normal Vector

4.1 Vector treatment

We are given three 3-vectors \( \mathbf{P}_{1} \), \( \mathbf{P}_{2} \), \( \mathbf{P}_{3} \), defining the three points vertices of the triangle. Using elementary vector subtraction, we find two edges of the triangle, \( \mathbf{E}_{1} \) and \( \mathbf{E}_{2} \), using Equations 1 and 2.

\begin{displaymath}
\mathbf{E}_{1}=\mathbf{P}_{3}-\mathbf{P}_{2}
\end{displaymath} (1)


\begin{displaymath}
\mathbf{E}_{2}=\mathbf{P}_{2}-\mathbf{P}_{1}
\end{displaymath} (2)

The definition of the surface normal vector is a unit-length vector which is perpendicular to any vector in the plane of the surface. Thus an unnormalised surface normal vector can be obtained by taking the cross-product of any two vectors in the plane of the surface. As \( \mathbf{E}_{1} \) and \( \mathbf{E}_{2} \) are both vectors in the plane of the surface, Equation 3 gives one such unnormalised surface normal vector.

\begin{displaymath}
\mathbf{n}=\mathbf{E}_{1}\times \mathbf{E}_{2}
\end{displaymath} (3)

The unnormalised surface normal vector of Equation 3 is now normalised in Equation 4, where \( \left\vert \mathbf{v}\right\vert =\sqrt{v_{x}^{2}+v_{y}^{2}+v_{z}^{2}} \) is used to denote the magnitude of the vector \( \mathbf{v} \).
\begin{displaymath}
\hat{\mathbf{n}}=\frac{1}{\left\vert \mathbf{n}\right\vert }\mathbf{n}
\end{displaymath} (4)

Figure 9: Geometry of the given triangle and its surface normal.
\includegraphics{fig-triangle.eps}

If the points \( \mathbf{P}_{1} \), \( \mathbf{P}_{2} \) and \( \mathbf{P}_{3} \) are defined in a clockwise order and the surface normal is required to be in the ``upward'' direction, as depicted in Figure 9, then the vectors \( \mathbf{E}_{1} \), \( \mathbf{E}_{2} \) and \( \hat{\mathbf{n}} \) form a right-handed set, as is usually desired.


next up previous
Next: 4.2 Scalar treatment Up: 4 Surface Normal Vector Previous: 4 Surface Normal Vector
Kevin Pulo
2000-08-22