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:

Wolfram Research (2014), MeshCellStyle, Wolfram Language function, https://reference.wolfram.com/language/ref/MeshCellStyle.html (updated 2015).

Text

Wolfram Research (2014), MeshCellStyle, Wolfram Language function, https://reference.wolfram.com/language/ref/MeshCellStyle.html (updated 2015).

CMS

Wolfram Language. 2014. "MeshCellStyle." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2015. https://reference.wolfram.com/language/ref/MeshCellStyle.html.

APA

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

BibTeX

@misc{reference.wolfram_2024_meshcellstyle, author="Wolfram Research", title="{MeshCellStyle}", year="2015", howpublished="\url{https://reference.wolfram.com/language/ref/MeshCellStyle.html}", note=[Accessed: 30-December-2024 ]}

BibLaTeX

@online{reference.wolfram_2024_meshcellstyle, organization={Wolfram Research}, title={MeshCellStyle}, year={2015}, url={https://reference.wolfram.com/language/ref/MeshCellStyle.html}, note=[Accessed: 30-December-2024 ]}