VertexNormals

VertexNormals
is an option for graphics primitives which specifies the normal directions to assign to 3D vertices.

DetailsDetails

  • VertexNormals can be used with Polygon, Line, Point, and GraphicsComplex.
  • VertexNormals->{n1, n2, ...} 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.
  • VertexNormals->Automatic is equivalent to VertexNormals->None, except that vertex normals given in any enclosing GraphicsComplex will be used.

ExamplesExamplesopen allclose all

Basic Examples (1)Basic Examples (1)

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]=
New in 6
New to Mathematica? Find your learning path »
Have a question? Ask support »