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.

Details and Options

Examples

open allclose all

Basic Examples  (3)

Polygons and lines in 2D:

Polygons and lines in 3D:

Use built-in PolyhedronData:

Do the same using PolyhedronData property annotations:

Scope  (3)

The coordinate data for any primitive can come from a GraphicsComplex:

3D primitives:

Mixing directives and primitives within a GraphicsComplex:

Options  (7)

ContentSelectable  (3)

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:

VertexColors  (2)

Specify colors for each vertex:

Specify vertex colors for 3D polygons:

VertexNormals  (1)

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:

VertexTextureCoordinates  (1)

Texture mapping with 2D polygons:

Texture mapping with 3D polygons:

Applications  (2)

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:

Properties & Relations  (4)

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:

Neat Examples  (2)

A random selection of index coordinates:

Cows with random gradients:

Wolfram Research (2007), GraphicsComplex, Wolfram Language function, https://reference.wolfram.com/language/ref/GraphicsComplex.html.

Text

Wolfram Research (2007), GraphicsComplex, Wolfram Language function, https://reference.wolfram.com/language/ref/GraphicsComplex.html.

CMS

Wolfram Language. 2007. "GraphicsComplex." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/GraphicsComplex.html.

APA

Wolfram Language. (2007). GraphicsComplex. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/GraphicsComplex.html

BibTeX

@misc{reference.wolfram_2024_graphicscomplex, author="Wolfram Research", title="{GraphicsComplex}", year="2007", howpublished="\url{https://reference.wolfram.com/language/ref/GraphicsComplex.html}", note=[Accessed: 22-November-2024 ]}

BibLaTeX

@online{reference.wolfram_2024_graphicscomplex, organization={Wolfram Research}, title={GraphicsComplex}, year={2007}, url={https://reference.wolfram.com/language/ref/GraphicsComplex.html}, note=[Accessed: 22-November-2024 ]}