Mathematica 9 is now available
THIS IS DOCUMENTATION FOR AN OBSOLETE PRODUCT.
SEE THE DOCUMENTATION CENTER FOR THE LATEST INFORMATION.
Mathematica > Visualization and Graphics > Symbolic Graphics Language >

GraphicsComplex

GraphicsComplex[{pt1, pt2, ...}, data]
represents a graphics complex in which coordinates given as integers i in graphics primitives in data are taken to be pti.
  • GraphicsComplex[{pt1, pt2, ...}, data] effectively replaces integers i that appear as coordinates in data by the corresponding pti.
  • GraphicsComplex provides a convenient way to build up meshes or simplicial complexes in which vertices of polygons are shared.
  • In GraphicsComplex[pts, data], data can be any nested list of graphics primitives and directives.
  • The following options can be given:
ContentSelectableAutomaticwhether to allow contents to be selected
VertexColorsAutomaticvertex colors corresponding to each pti
VertexNormalsAutomaticvertex normals corresponding to each pti
  • Normal[GraphicsComplex[pts, data]] substitutes coordinates to give an ordinary list of graphics primitives and directives.
The coordinate data for any primitive can come from a GraphicsComplex:
3D primitives:
Mixing directives and primitives within a GraphicsComplex:
No individual object is selectable; the graphics complex appears as one object:
Allow the individual objects in the graphics complex to be selectable by a single click:
The first click selects the whole complex, and subsequent clicks select individual objects:
Specify colors for each vertex:
Specify vertex colors for 3D polygons:
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:
Most surface and region plots produce GraphicsComplex:
You can use GraphicsComplex to transform the coordinates in this simple rotation:
The same idea applies to 3D surfaces:
Set up a graphics complex with shared coordinates:
Applying Normal will split a complex into primitives with duplicated coordinates:
Both forms produce the same image:
Graphics complexes can be built up from integrated PolyhedronData:
Or, get a graphics complex directly:
ExampleData contains a number of 3D graphics complex models:
Many Import formats produce GraphicsComplex:
In this case the surface has about 35000 vertices:
A random selection of index coordinates:
Cows with random gradients:
New in 6
Ask a question about this page  |  Suggest an improvement  |  Leave a message for the team