[Nx,Ny,Nz] = surfnorm(X,Y,Z)
[Nx,Ny,Nz] = surfnorm(Z)
surfnorm(Z)
surfnorm(X,Y,Z)
[Nx,Ny,Nz] = surfnorm(X,Y,Z)
returns the components of the three-dimensional surface normals for the surface defined by the matrices X
, Y
, and Z
. The surface normals are unnormalized and are valid at each vertex. surfnorm
is used by surfl
to compute surface normals.
[Nx,Ny,Nz] = surfnorm(Z)
returns the normal vector components for the surface defined by Z
.
surfnorm(Z)
and surfnorm(X,Y,Z)
plot the surface with the normals emanating from it. Normals are not shown for surface elements that face away from the viewer.
The direction of the normals is reversed by calling surfnorm
with transposed arguments.
surfnorm(X',Y',Z')
X
, Y
, and Z
matrices. For each vertex, diagonal vectors are computed and crossed to form the normal.
[x,y,z] = cylinder(1:10);
surfnorm(x,y,z)
See Alsodiffuse
,specular
,surfl
(c) Copyright 1994 by The MathWorks, Inc.