Surface gradient (source code)

= Surface gradient
{title2=$\nabla_s f$}

For an embedded surface with unit <normal vector> $\mathbf n$, the surface gradient is $\nabla_sf=(\mathbf I-\mathbf n\mathbf n^T)\nabla f$. It projects the ambient <gradient> onto the <tangent space> and is independent of how $f$ is extended normally off the surface.