|MATLAB Function Reference|
Compute and display 3-D surface normals
surfnorm function computes surface normals for the surface defined by
Z. The surface normals are unnormalized and valid at each vertex. Normals are not shown for surface elements that face away from the viewer.
surfnorm(Z) and surfnorm(X,Y,Z)
plot a surface and its surface normals.
Z is a matrix that defines the z component of the surface.
Y are vectors or matrices that define the x and y components of the surface.
[Nx,Ny,Nz] = surfnorm(...)
returns the components of the three-dimensional surface normals for the surface.
The direction of the normals is reversed by calling
surfnorm with transposed arguments:
surfnorm to compute surface normals when calculating the reflectance of a surface.
The surface normals are based on a bicubic fit of the data in
Z. For each vertex, diagonal vectors are computed and crossed to form the normal.
Plot the normal vectors for a truncated cone.
Colormaps for related functions