Wolfram ResearchProductsPurchasingServices & ResourcesAbout UsOur Sites
Mathematica > 3D Graphics Options >

VertexColors

VertexColors
is an option for Polygon and GraphicsComplex which specifies the colors to assign to vertices of 2D and 3D polygons.
  • VertexColors->{col1, col2, ...} specifies that color coli should be assigned to vertex i.
  • The interior of the polygon is colored by interpolating between the colors specified by VertexColors.
  • In 3D, settings for VertexColors can include any surface or material property, to be used with simulated lighting.
  • The colors coli for each vertex can be an explicit color directive such as GrayLevel[g] or RGBColor[r, g, b], or can have the following forms:
gGrayLevel[g]
{g,a}GrayLevel[g, a]
{r,g,b}RGBColor[r, g, b]
{r,g,b,a}RGBColor[r, g, b, a]
Specify vertex colors for 2D polygons:
In[1]:=
Click for copyable input
Out[1]=
 
Specify vertex colors for 3D polygons:
In[1]:=
Click for copyable input
Out[1]=
 
Opacity can be specified for each vertex as well:
In[1]:=
Click for copyable input
Out[1]=
 
Assign colors for shared vertices:
In[1]:=
Click for copyable input
In[2]:=
Click for copyable input
In[3]:=
Click for copyable input
Out[3]=
New in 6
© 2008 Wolfram Research, Inc. japanese.gif
Ask a question about this page  |  Suggest an improvement  |  Leave a message for the team