BoundaryMeshRegion

BoundaryMeshRegion[{p1,p2,},{bcell1[{i1,}],bcell2[{j1,}],}]
yields a mesh with boundary cells , where coordinates given as integer i are taken to be , where the cells together represent a closed curve, surface, etc.

BoundaryMeshRegion[,{,wi[bcelli[]],}]
yields a mesh with cell properties defined by the symbolic wrapper .

BoundaryMeshRegion[,boundary1,boundary2,]
yields a mesh from multiple boundaries .

Details and OptionsDetails and Options

  • BoundaryMeshRegion is also known as a boundary representation.
  • BoundaryMeshRegion can represent a piecewise linear and full-dimensional region embedded in dimension 1, 2, or 3.
  • BoundaryMeshRegion[] displays in a notebook as a plot of a boundary mesh region.
  • BoundaryMeshRegion is typically constructed using functions such as ConvexHullMesh, BoundaryMesh, BoundaryDiscretizeRegion, and BoundaryDiscretizeGraphics.
  • The boundary cells need to represent a closed curve or surface without self intersections.
  • In BoundaryMeshRegion[{p1,p2,},b1,b2,] the boundary curves or surfaces should cross themselves or each other.
  • In BoundaryMeshRegion[{p1,p2,},b1,b2,] a point p is considered to be in the region enclosed by the boundary curves or surfaces if any infinite ray starting at p crosses the set of boundaries an odd number of times.
  • The following special wrappers can be used for boundary faces:
  • Labeled[cell,]dislplay the cell with labeling
    Style[cell,]show the cell with the specified style
    Property[cell,name->value]associate the property with cell
  • Each cell in a BoundaryMeshRegion is given a unique MeshCellIndex of the form , where d is the geometric dimension and i is the index.
  • For purposes of selecting cells of a BoundaryMeshRegion, 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 ,
    {c1,c2,}list of explicit cells
  • The index specification ispec can have the following form:
  • icell index i
    {i1,i2,}cells with indices
    Allall cells
    pattcells with indices matching the pattern patt
  • The dimension specification dspec can have the following form:
  • dexplicit dimension d
    Allall dimensions from 0 to geometric dimension of region
    pattdimensions matching the pattern patt
  • BoundaryMeshRegion contains cells of maximal dimension n-1 where n is the embedding dimension.
  • BoundaryMeshRegion is always converted to an optimized representation and treated as raw by functions like AtomQ for purposes of pattern matching.
  • BoundaryMeshRegion 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:
  • MeshCellLabelAutomaticlabels and placement for cells
    MeshCellStyleAutomaticstyles for cells
    MeshCellMarker0integer markers for 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.
  • BoundaryMeshRegion can be used with functions such as RegionMember, RegionDistance, RegionMeasure, and NDSolve.

ExamplesExamplesopen allclose all

Basic Examples  (5)Basic Examples  (5)

Specify an interval from its boundary points:

In[1]:=
Click for copyable input
Out[1]=

It is full dimensional:

In[2]:=
Click for copyable input
Out[2]=

The region is bounded:

In[3]:=
Click for copyable input
Out[3]=

The length and centroid:

In[4]:=
Click for copyable input
Out[4]=

Check point membership:

In[5]:=
Click for copyable input
Out[5]=

Specify a triangle from its closed boundary curve:

In[1]:=
Click for copyable input
Out[1]=

It is full dimensional:

In[2]:=
Click for copyable input
Out[2]=

The region is bounded:

In[3]:=
Click for copyable input
Out[3]=

The area and centroid:

In[4]:=
Click for copyable input
Out[4]=

Check point membership:

In[5]:=
Click for copyable input
Out[5]=

Specify a tetrahedron from its closed boundary surface:

In[1]:=
Click for copyable input
Out[1]=

It is full dimensional:

In[2]:=
Click for copyable input
Out[2]=

The region is bounded:

In[3]:=
Click for copyable input
Out[3]=

The volume and centroid:

In[4]:=
Click for copyable input
Out[4]=

Check point membership:

In[5]:=
Click for copyable input
Out[5]=

Specify a 2D region from multiple closed boundary curves:

In[1]:=
Click for copyable input
In[2]:=
Click for copyable input
Out[2]=

Find its area:

In[3]:=
Click for copyable input
Out[3]=

Specify a 3D region from multiple closed boundary surfaces:

In[1]:=
Click for copyable input
In[2]:=
Click for copyable input
In[3]:=
Click for copyable input
Out[3]=

Find its volume:

In[4]:=
Click for copyable input
Out[4]=
Introduced in 2014
(10.0)