This is documentation for Mathematica 8, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.1)

VertexNormals

VertexNormals
is an option for graphics primitives which specifies the normal directions to assign to 3D vertices.
  • VertexNormals specifies that vertex i should have effective normal for purposes of shading by simulated lighting.
  • The are vectors of the form . Only the directions of these vectors ever matter; the vectors are in effect automatically normalized to unit length.
  • VertexNormals->None specifies that no explicit vertex normals are being given, and normal directions should be deduced from the actual coordinates specified for vertices. For point and line-like primitives, no shading based on simulated lighting should be done.
Compute normal vectors using the cross product of edge vectors:
A triangle with normals pointing in the direction :
Using different normals will affect shading:
Specify vertex normals for 3D lines:
Specify vertex normals for 3D points:
Compute normal vectors using the cross product of edge vectors:
In[1]:=
Click for copyable input
In[2]:=
Click for copyable input
Out[2]=
A triangle with normals pointing in the direction :
In[3]:=
Click for copyable input
Out[3]=
Using different normals will affect shading:
In[4]:=
Click for copyable input
Out[4]=
Specify vertex normals for 3D lines:
In[5]:=
Click for copyable input
Out[5]=
Specify vertex normals for 3D points:
In[6]:=
Click for copyable input
Out[6]=
Define vertices and face indices of a cylindrical model:
Without surface normals, the shading is constant or flat for each polygon face:
With surface normals, the shading is interpolated or smooth across each polygon face:
Plot functions automatically generate surface normals:
Without surface normals, you get flat or faceted shading:
A function that visualizes the surface normals using lines:
Visualize the normals for some surfaces:
Vary the effective normals used on the surface:
A shaded mesh line object with data from ExampleData:
New in 6