# MeshRegion

MeshRegion[{p1,p2,},{mcell1[{i1,}],mcell2[{j1,}],}]

yields a mesh with cells mcellj, where coordinates given as integer i are taken to be pi.

MeshRegion[,{,wi[mcelli[]],}]

yields a mesh with cell properties defined by the symbolic wrapper wi.

# Details and Options

• MeshRegion is also known as a simplicial complex or cell complex.
• MeshRegion can represent a piecewise linear region of any geometric dimension embedded in dimension 1, 2, or 3.
• MeshRegion[] displays in a notebook as a plot of a mesh region.
• MeshRegion is typically created using functions such as DelaunayMesh, DiscretizeGraphics, and DiscretizeRegion.
• The region represented by MeshRegion consists of the disjoint union of mesh cells.
• MeshRegion has an embedding dimension that is equal to the length of each point pi and can be found using RegionEmbeddingDimension.
• Each cell has a geometric dimension and can be found using RegionDimension.
• Possible mesh cells mcelli and their geometric dimensions:
•  Point[i] 0 point Line[{i1,i2,…}] 1 line segments {i1,i2}, {i2,i3}, … Triangle[{i1,i2,i3}] 2 filled triangle Polygon[{i1,i2,…}] 2 filled polygon Tetrahedron[{i1,…,i4}] 3 filled tetrahedron Hexahedron[{i1,…,i8}] 3 filled hexahedron Pyramid[{i1,…,i5}] 3 filled pyramid Prism[{i1,…,i6}] 3 filled prism Simplex[{i1,…,ik}] 0, 1, 2, 3 filled simplex
• Tetrahedron, Hexahedron, Pyramid, and Prism can only be used with 3D coordinates.
• Point, Line, Triangle, Polygon, Tetrahedron, Hexahedron, Pyramid, Prism, and Simplex all have multi-cell specifications as well.
• The following special wrappers wi can be used for cells:
•  Labeled[cell,…] display the cell with labeling Style[cell,…] show the cell with the specified style Property[cell,name->value] associate the property name->value with cell
• Each cell in a MeshRegion is given a unique MeshCellIndex of the form {d,i}, where d is the geometric dimension and i is the index.
• For purposes of selecting cells of a MeshRegion, the following cell specifications may be used:
•  {d,i} cell with index i of dimension d {d,ispec} cells with index specification ispec of dimension d {dspec,…} cells of dimensions given by dspec h[{i1,…}] explicit cell with head h and vertex indices i1, … {c1,c2,…} list of explicit cells ci
• The index specification ispec can have the following form:
•  i cell index i {i1,i2,…} cells with indices ik All all cells patt cells with indices matching the pattern patt
• The dimension specification dspec can have the following form:
•  d explicit dimension d All all dimensions from 0 to geometric dimension of region patt dimensions matching the pattern patt
• MeshRegion is always converted to an optimized representation and treated as raw by functions like AtomQ for purposes of pattern matching.
• MeshRegion has the same options as Graphics for embedding dimension 2 and the same options as Graphics3D for embedding dimension 3 with the following additions and changes:
•  MeshCellLabel Automatic labels and placement for cells MeshCellShapeFunction Automatic shape functions for cells MeshCellStyle Automatic styles for cells MeshCellHighlight {} list of highlighted cells MeshCellMarker 0 integer markers for cells PlotTheme \$PlotTheme overall theme for the mesh
• Possible settings for PlotTheme include common base themes, font features themes, and size features themes.
• Mesh features themes affect plot of mesh cells. Themes include:
•  "Points" 0D cells "Lines" 1D cells, wireframe "Polygons" 2D cells
• Rendering features themes affect the rendering of meshes. Themes include:
•  "SampledPoints" sampled points from mesh cells "SphereAndTube" points as spheres and lines as tubes "SmoothShading" smooth shading "FaceNormals" normal for each 2D cell "LargeMesh" optimized for large number of cells
• Style and other specifications for cells are effectively applied in the order MeshCellStyle, Style, and other wrappers, with later specifications overriding earlier ones.
• Label style and other specifications for cell labels are effectively applied in the order MeshCellLabel and Labeled, with later specifications overriding earlier ones.
• MeshRegion can be used with functions such as RegionMember, RegionDistance, RegionMeasure, and NIntegrate.

# Examples

open allclose all

## Basic Examples(6)

A 1D (curve) mesh region in 1D:

 In[1]:=
 Out[1]=

Label each point with its index:

 In[2]:=
 Out[2]=

A 1D (curve) mesh region in 2D:

 In[1]:=
 Out[1]=

Label each point with its index:

 In[2]:=
 Out[2]=

A 2D (surface) mesh region in 3D with each point labeled by its index:

 In[1]:=
 In[2]:=
 Out[2]=

A 3D (volume) mesh region in 3D with points labeled by its index:

 In[1]:=
 In[2]:=
 Out[2]=

A mesh region containing cells of mixed dimensions:

 In[1]:=
 In[2]:=
 Out[2]=

A volume mesh region in 3D from DelaunayMesh:

 In[1]:=
 Out[1]=

Find its volume:

 In[2]:=
 Out[2]=