is an option for DiscretizeRegion and related functions that specifies a mesh cell quality goal for the result.
MeshQualityGoal
is an option for DiscretizeRegion and related functions that specifies a mesh cell quality goal for the result.
Details
- Possible settings include:
-
Automatic quality automatically chosen "Minimal" minimal quality, no quality goal "Maximal" maximal quality q quality 
- The automatically chosen quality goal may depend on PerformanceGoal and other option settings.
- The quality measure
is computed so that for regular polygons and polyhedra
and for degenerate polygons and polyhedra
. - It is generally not possible to generate a mesh to satisfy MeshQualityGoal->1. In this case, the meshing routine will try for the best quality that can typically be achieved.
Examples
open all close allBasic Examples (1)
Triangulate an octagon with a minimal number of triangles:
octo = BoundaryMeshRegion[{{-1, -2}, {1, -2}, {2, -1}, {2, 1}, {1, 2}, {-1, 2}, {-2, 1}, {-2, -1}}, Line[{1, 2, 3, 4, 5, 6, 7, 8, 1}]]TriangulateMesh[octo, MeshQualityGoal -> "Minimal"]Triangulate with more regular triangles:
TriangulateMesh[octo, MeshQualityGoal -> 1, MaxCellMeasure -> 10]Scope (2)
Triangulate an octagon with the "Minimal" and "Maximal" number of triangles:
octo = BoundaryMeshRegion[{{-1, -2}, {1, -2}, {2, -1}, {2, 1}, {1, 2}, {-1, 2}, {-2, 1}, {-2, -1}}, Line[{1, 2, 3, 4, 5, 6, 7, 8, 1}]]Table[TriangulateMesh[octo, MeshQualityGoal -> q], {q, {"Minimal", "Maximal"}}]Triangulate with more regular triangles, but no measure constraint:
TriangulateMesh[octo, MeshQualityGoal -> 1, MaxCellMeasure -> 10]Specify a numeric quality goal:
Table[DiscretizeRegion[ImplicitRegion[x ^ 2 - y ^ 2 ≤ 1, {{x, -3, 3}, {y, -3, 3}}], MeshQualityGoal -> q, MaxCellMeasure -> 10], {q, {0.1, 0.5, 0.9}}]Related Guides
History
Text
Wolfram Research (2014), MeshQualityGoal, Wolfram Language function, https://reference.wolfram.com/language/ref/MeshQualityGoal.html.
CMS
Wolfram Language. 2014. "MeshQualityGoal." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/MeshQualityGoal.html.
APA
Wolfram Language. (2014). MeshQualityGoal. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/MeshQualityGoal.html
BibTeX
@misc{reference.wolfram_2026_meshqualitygoal, author="Wolfram Research", title="{MeshQualityGoal}", year="2014", howpublished="\url{https://reference.wolfram.com/language/ref/MeshQualityGoal.html}", note=[Accessed: 13-June-2026]}
BibLaTeX
@online{reference.wolfram_2026_meshqualitygoal, organization={Wolfram Research}, title={MeshQualityGoal}, year={2014}, url={https://reference.wolfram.com/language/ref/MeshQualityGoal.html}, note=[Accessed: 13-June-2026]}