({{, (RefLink[MaxCellMeasure, paclet:ref/MaxCellMeasure]) 
is an option for (RefLink[DiscretizeRegion, paclet:ref/DiscretizeRegion]) and related functions that specifies the maximum cell measure for the result.}})

OpenersNotesSection(Spacer1)Details

Possible settings for a region of dimension d include:

The names "Volume", "Area", and "Length" may be used in place of the dimensions 3, 2, and 1.

When only a few cell measure constraints are given, other constraints are automatically computed to be compatible with mesh cells of reasonable quality.

OpenersPrimaryExamplesSection(Spacer1)Examples  (10)

OpenersExampleSection0(Spacer1)Basic Examples  (1)

Discretize a unit disk into triangles with area at most 0.5:

DiscretizeRegion[Disk[],MaxCellMeasure->.5]

Restrict the area to 0.01:

DiscretizeRegion[Disk[],MaxCellMeasure->0.01]

OpenersExampleSection1(Spacer1)Scope  (8)

Discretize a unit disk into triangles with area at most 0.1:

DiscretizeRegion[Disk[],MaxCellMeasure->.1]

Restrict the area to 0.01:

mr=DiscretizeRegion[Disk[],MaxCellMeasure->0.01]

This gives the areas of the triangles:

PropertyValue[{mr,2},MeshCellMeasure]//Short

Specify a maximum length for line segments:

mr = DiscretizeRegion[Disk[],MaxCellMeasure->{"Length"->.1}]

A (RefLink[Histogram, paclet:ref/Histogram]) of the line segment lengths:

Histogram[PropertyValue[{mr,{1}},MeshCellMeasure]]

In 3D, specify a maximum area for faces:

mr=DiscretizeRegion[Ball[],MaxCellMeasure->{"Area"->0.05}]

A (RefLink[Histogram, paclet:ref/Histogram]) of the face areas:

Histogram[PropertyValue[{mr,{2}},MeshCellMeasure]]

Discretize a (RefLink[Graphics, paclet:ref/Graphics]) scene with a maximum cell area of 0.1:

g=Graphics[{Disk[{0,0}],Circle[{1,0}]}]

mr=DiscretizeGraphics[g,MaxCellMeasure->0.1]

Discretize a (RefLink[Graphics3D, paclet:ref/Graphics3D]) scene with a maximum cell volume of 0.1:

g=Graphics3D[{Cylinder[{{2,2,0},{2,2,2}},1],Sphere[{3,3,1}]}]

mr=DiscretizeGraphics[g,MaxCellMeasure->0.1]

Compare different length settings:

g=Graphics[{Circle[{0,0}],Circle[{1,0}]}]

Table[DiscretizeGraphics[g,MaxCellMeasure->{"Length"->m}],{m,{0.9,0.6,0.3}}]

Compare different area settings:

g=Graphics[{Disk[{0,0}],Disk[{1,0}]}]

Table[BoundaryDiscretizeGraphics[g,MaxCellMeasure->{"Area"->m}],{m,{0.4,0.2,0.05}}]

Compare different face area settings:

g=Graphics3D[{Cylinder[{{2,2,0},{2,2,2}},1],Sphere[{3,3,1}]}]

Table[DiscretizeGraphics[g,MaxCellMeasure->{"Area"->m}],{m,{1,0.1,0.01}}]

OpenersExampleSection3(Spacer1)Applications  (1)

More accurately approximate a curved boundary by reducing (RefLink[MaxCellMeasure, paclet:ref/MaxCellMeasure]):

DiscretizeRegion[Ball[],MaxCellMeasure->#]&/@{1,0.1,0.01}

({{DocumentationFooterIconsRelatedFunction.png, ({{See Also}, {(RefLink[DiscretizeRegion, paclet:ref/DiscretizeRegion])  ▪  (RefLink[BoundaryDiscretizeRegion, paclet:ref/BoundaryDiscretizeRegion])  ▪  (RefLink[TriangulateMesh, paclet:ref/TriangulateMesh])  ▪  (RefLink[DiscretizeGraphics, paclet:ref/DiscretizeGraphics])  ▪  (RefLink[BoundaryDiscretizeGraphics, paclet:ref/BoundaryDiscretizeGraphics])}})}})

({{DocumentationFooterIconsRelatedGuide.png, ({{Related Guides}, {▪(RefLinkPlain[Mesh-Based Geometric Regions, paclet:guide/MeshRegions])}})}})