MeshCellStyle

MeshCellStyle

is an option and annotation of MeshRegion, BoundaryMeshRegion, and related functions that specifies styles to use for mesh cells.

Details

  • The following option settings can be used:
  • Automaticuse automatic setting for style
    Nonerender mesh cells with perfect transparency
    styleuse style for all mesh cells
    {cellspec1->style1,}use stylei for mesh cell cellspeci
  • Mesh cells with no explicit mesh cell style are taken to use the automatic style.
  • The wrapper Style[cellspec,style] is equivalent to Annotation[cellspec,MeshCellStylestyle] and can be used when creating mesh regions in functions such as MeshRegion, BoundaryMeshRegion, etc.
  • To specify multiple style directives, use Directive[style1,style2,].
  • The cell specification cellspec follows the standard form described for MeshRegion and BoundaryMeshRegion.
  • Style and other specifications are effectively applied in the order MeshCellStyle, Style and other wrappers, and MeshCellShapeFunction, with later specifications overriding earlier ones.

Examples

open allclose all

Basic Examples  (3)

Style all 1D cells red and all 0D cells black:

Style all 2D cells transparent orange, 1D elements red, and 0D elements black:

Style all 2D cells transparent orange:

Scope  (10)

Style all 1D cells red and all 0D cells black:

Style all 2D cells transparent orange, 1D elements red, and 0D elements black:

Style all 2D cells transparent orange:

Individual cells can be styled using their cell index:

Or by the cell itself:

All can be used to specify all cells:

By default, all cells are styled:

Style all cells of a given dimension:

Specify a list of cell indices to style:

Style cells whose dimensions match a pattern:

Style cells whose indices match a pattern:

Style with graphics directives appropriate for the dimension of the components:

Applications  (1)

Style a polyhedron's faces by the number of vertices it has:

Gather the faces with different numbers of vertices:

Color the Archimedean polyhedra:

Introduced in 2014
 (10.0)
 |
Updated in 2015
 (10.2)