Mathematica 9 is now available
THIS IS DOCUMENTATION FOR AN OBSOLETE PRODUCT.
SEE THE DOCUMENTATION CENTER FOR THE LATEST INFORMATION.
Mathematica > Visualization and Graphics > Graphics Options & Styling > 3D Graphics Options > VertexNormals >

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
Ask a question about this page  |  Suggest an improvement  |  Leave a message for the team
Format:   HTML  |  CDF