Surface Gradient and Source Direction

Surface Gradient

Let \(z=f(x,y)\) represent a 3D surface.

Surface gradient describes as:

$$z=f(x,y)$$
$$\left( -\frac{\partial z}{\partial x}, -\frac{\partial z}{\partial y} \right) = (p, q)$$

Surface Normal

The surface normal \( \mathbf{N} \) describes the orientation of the surface at a scene point describes as:

$$ \mathbf{N} = \left( -\frac{\partial z}{\partial x}, -\frac{\partial z}{\partial y}, 1 \right) = (p, q, 1) $$

And, unit surface normal \( \mathbf{n} \) forms as:

$$\mathbf{n} = \frac{\mathbf{N}} {\| \mathbf{N}\|} =\frac{(p, q, 1)}{\sqrt{p^2 + q^2 + 1}} $$

Tangent Plane

A tangent plane is a flat surface touches to a single point on the curved surface \(y=f(x)\), witch perpendicular to the surface normal \( \mathbf{n} \). For a plane given by plane equation \(ax+by+cz+d=0\), where \((a, b, c)\) is the surface normal and \((x, y, z)\) is a point of the surface.

Source Direction

Source direction \( \mathbf{S} \) describes as:

$$ \mathbf{S} = \left( -\frac{\partial z}{\partial x}, -\frac{\partial z}{\partial y}, -1 \right) = (p_s, q_s, -1)$$