surfnorm
Surface normal vectors at grid points.
Syntax
Section titled “Syntax”[X, Y, Z] = surfnorm(x, y, z)Description
Section titled “Description”Returns the components of the unit normal vector at each (x, y, z) grid point. Useful when manually computing lighting, contact forces, or surface analysis.
Example
Section titled “Example”[Nx, Ny, Nz] = surfnorm(X, Y, Z);See also
Section titled “See also”surf— 3D surface plot with colored faces.