surfnorm
- :
[nx, ny, nz] =surfnorm(z)¶ - :
[nx, ny, nz] =surfnorm(x, y, z)¶ - : surfnorm
(…)¶ Compute the unit normals of the surface given by the grid data z.
The normals are evaluated at the grid points from the cross product of the tangents along the columns and along the rows (central differences inside, one-sided differences at the border). x and y are matrices of the size of z or vectors of length
columns (z)androws (z); by default they count columns and rows. Where the tangents degenerate the normal isNaN.Without output arguments the surface and its normals are drawn.