Normal
The method for finding the normal vector depends on which mathematical form you use to define the 3D surface.
- Implicit Form: \(F(x, y, z) = 0\)
The normal vector is found by calculating the gradient (\(\nabla\)) of the function. The gradient vector points in the direction of the steepest rate of change, which is geometrically perpendicular to the level surface where \(F = 0\).
\[\vec{n} = \nabla F = \left\langle \frac{\partial F}{\partial x}, \frac{\partial F}{\partial y}, \frac{\partial F}{\partial z} \right\rangle\]
- Explicit Form: \(z = f(x, y)\)
You can easily find this normal by rewriting the explicit equation into an implicit one: \(F(x, y, z) = f(x, y) - z = 0\). Taking the gradient of this new rearranged function yields a fast, standard formula using the partial derivatives \(f_x\) and \(f_y\):
\[\vec{n} = \langle f_x, f_y, -1 \rangle\]
(Note: Depending on whether you subtract \(z\) or subtract \(f(x,y)\), the normal will point either downward or upward, respectively).
- Parametric Form: \(\vec{r}(u, v) = \langle x(u,v), y(u,v), z(u,v) \rangle\)
For a surface defined by two parameters \(u\) and \(v\), taking the partial derivative with respect to \(u\) gives a tangent vector \(\vec{r}_u\) lying flat along the surface. Taking the derivative with respect to \(v\) gives a second tangent vector \(\vec{r}_v\). The normal vector is the cross product of these two tangent vectors.
\[\vec{n} = \vec{r}_u \times \vec{r}_v\]
In 3D CAD modeling environments like PTC Creo Parametric, this specific cross-product calculation runs constantly under the hood to define the "inside" versus "outside" boundaries of solid mechanical components and to calculate how light reflects off faces during rendering.
To use these calculations in physics or engineering formulas (like calculating flux), you usually need the unit normal vector (denoted as \(\hat{n}\)). You find this by dividing the resulting normal vector by its own magnitude:
\[\hat{n} = \frac{\vec{n}}{\vert{}\vec{n}\vert{}}\]