TriangulateMesh
✖
TriangulateMesh
Details and Options


- TriangulateMesh is also known as triangulation, tetrahedralization, simplicial decomposition, mesh generation and mesh refinement.
- Typically used to generate a partition of a region into lines (1D), triangles (2D) or tetrahedra (3D) optimized to some criteria.
- TriangulateMesh has the same options as MeshRegion, with the following additions and changes:
-
MaxCellMeasure Automatic maximum cell measure MeshQualityGoal Automatic quality goal for mesh cells MeshRefinementFunction None function that returns True if a mesh cell needs refinement Method Automatic method to use PerformanceGoal $PerformanceGoal whether to consider speed or quality - Possible settings for the Method option include:
-
"ConformingDelaunay" triangulation that satisfies the Delaunay condition "ConstrainedDelaunay" triangulation that preserves original 1D boundary cells and almost satisfies the Delaunay condition "ConstrainedQuality" triangulation that adds fewer 0D cells and almost satisfies the Delaunay condition - A triangulation
of a mesh mr satisfies the Delaunay condition if no original point on the boundary of mr is inside the circumsphere of any simplex in
.

Examples
open allclose allBasic Examples (3)Summary of the most common use cases
Triangulate a BoundaryMeshRegion in 1D:

https://wolfram.com/xid/05fh7rcsz6-gb499h


https://wolfram.com/xid/05fh7rcsz6-h2k6zv

Control the cell quality and sizes by using options:

https://wolfram.com/xid/05fh7rcsz6-b27uy6

Triangulate a BoundaryMeshRegion in 2D:

https://wolfram.com/xid/05fh7rcsz6-wekdl


https://wolfram.com/xid/05fh7rcsz6-d3n0db

Control the cell quality and sizes by using options:

https://wolfram.com/xid/05fh7rcsz6-bl3j9t

Triangulate a BoundaryMeshRegion in 3D:

https://wolfram.com/xid/05fh7rcsz6-qmliv


https://wolfram.com/xid/05fh7rcsz6-enk19b

Control the cell quality and sizes by using options:

https://wolfram.com/xid/05fh7rcsz6-lj2w4k

Scope (4)Survey of the scope of standard use cases
Triangulate a BoundaryMeshRegion in 1D:

https://wolfram.com/xid/05fh7rcsz6-kv23x5


https://wolfram.com/xid/05fh7rcsz6-x4s40


https://wolfram.com/xid/05fh7rcsz6-2rk6q


https://wolfram.com/xid/05fh7rcsz6-dptvc6


https://wolfram.com/xid/05fh7rcsz6-e78twg


https://wolfram.com/xid/05fh7rcsz6-ybxxq

Triangulate a MeshRegion in 1D:

https://wolfram.com/xid/05fh7rcsz6-bcfp19


https://wolfram.com/xid/05fh7rcsz6-c9py2z


https://wolfram.com/xid/05fh7rcsz6-mka8y


https://wolfram.com/xid/05fh7rcsz6-eoq2ek


https://wolfram.com/xid/05fh7rcsz6-vktkw


https://wolfram.com/xid/05fh7rcsz6-h0ii1n

TriangulateMesh works individually on dimensional components:

https://wolfram.com/xid/05fh7rcsz6-gi1k9d

MaxCellMeasure controls the maximum size a cell in the triangulation can be:

https://wolfram.com/xid/05fh7rcsz6-eewa8r

The measure used is arc length for 1D meshes, area for 2D, and volume for 3D:

https://wolfram.com/xid/05fh7rcsz6-d9slmc

Options (28)Common values & functionality for each option
MaxCellMeasure (6)
Set different length constraints for a 1D region:

https://wolfram.com/xid/05fh7rcsz6-els6vl

Set different area constraints for a 2D region:

https://wolfram.com/xid/05fh7rcsz6-nz545k

The areas for the different triangles:

https://wolfram.com/xid/05fh7rcsz6-hbn21b

Set an edge length constraint for a 2D region:

https://wolfram.com/xid/05fh7rcsz6-ni4a2

The lengths for different edges:

https://wolfram.com/xid/05fh7rcsz6-gv238m

Set a volume constraint for a 3D region:

https://wolfram.com/xid/05fh7rcsz6-hy3rf

The volumes for different tetrahedra:

https://wolfram.com/xid/05fh7rcsz6-mjffvn

Set a face area constraint for a 3D region:

https://wolfram.com/xid/05fh7rcsz6-kp2ini

The areas for different faces:

https://wolfram.com/xid/05fh7rcsz6-fbeb4h

Set an edge length constraint for a 3D region:

https://wolfram.com/xid/05fh7rcsz6-e086e8

The lengths for different edges:

https://wolfram.com/xid/05fh7rcsz6-l30ch1

MeshCellHighlight (3)
MeshCellHighlight allows you to specify highlighting for parts of a TriangulateMesh:

https://wolfram.com/xid/05fh7rcsz6-y7md78

By making faces transparent, the internal structure of a 3D MeshRegion can be seen:

https://wolfram.com/xid/05fh7rcsz6-nsvjfb

Individual cells can be highlighted using their cell index:

https://wolfram.com/xid/05fh7rcsz6-dm25kz


https://wolfram.com/xid/05fh7rcsz6-m0ew3d

MeshCellLabel (3)
MeshCellLabel can be used to label parts of a TriangulateMesh:

https://wolfram.com/xid/05fh7rcsz6-s9ph0b

Label the vertices and edges of a polygon:

https://wolfram.com/xid/05fh7rcsz6-zmtbyv

Individual cells can be labeled using their cell index:

https://wolfram.com/xid/05fh7rcsz6-cm8df4


https://wolfram.com/xid/05fh7rcsz6-ri0ks8

MeshCellMarker (1)
MeshCellMarker can be used to assign values to parts of a TriangulateMesh:

https://wolfram.com/xid/05fh7rcsz6-gx4i29

Use MeshCellLabel to show the markers:

https://wolfram.com/xid/05fh7rcsz6-wr2t8y

MeshCellShapeFunction (2)
MeshCellShapeFunction allows you to specify functions for parts of a TriangulateMesh:

https://wolfram.com/xid/05fh7rcsz6-g991cc

Individual cells can be drawn using their cell index:

https://wolfram.com/xid/05fh7rcsz6-8n7ur5


https://wolfram.com/xid/05fh7rcsz6-bbtayg

MeshCellStyle (3)
MeshCellStyle allows you to specify styling for parts of a TriangulateMesh:

https://wolfram.com/xid/05fh7rcsz6-dhv9vm

By making faces transparent, the internal structure of a 3D MeshRegion can be seen:

https://wolfram.com/xid/05fh7rcsz6-r41qvw

Individual cells can be highlighted using their cell index:

https://wolfram.com/xid/05fh7rcsz6-xr4e58


https://wolfram.com/xid/05fh7rcsz6-il8na4

MeshQualityGoal (4)
The default setting is Automatic:

https://wolfram.com/xid/05fh7rcsz6-ce4ikp

Generate a "Minimal" quality triangulation:

https://wolfram.com/xid/05fh7rcsz6-jhbz3w

Generate a "Maximal" quality triangulation:

https://wolfram.com/xid/05fh7rcsz6-bbzmn4

Explicitly set a quantitative quality goal:

https://wolfram.com/xid/05fh7rcsz6-fxmhrr

MeshRefinementFunction (4)
Use MeshRefinementFunction to make the edges smaller left of the origin:

https://wolfram.com/xid/05fh7rcsz6-ggsse4

Use MeshRefinementFunction to make the triangles in the first quadrant smaller:

https://wolfram.com/xid/05fh7rcsz6-tympb0

Set a continuously varying area constraint:

https://wolfram.com/xid/05fh7rcsz6-gw0g98

https://wolfram.com/xid/05fh7rcsz6-rt8b3

Discretize the region more finely in the first orthant:

https://wolfram.com/xid/05fh7rcsz6-bousx9

Applications (4)Sample problems that can be solved with this function

https://wolfram.com/xid/05fh7rcsz6-kt0i5i


https://wolfram.com/xid/05fh7rcsz6-7rqgs


https://wolfram.com/xid/05fh7rcsz6-n3ab7a

Triangulate the basic 3D primitives:

https://wolfram.com/xid/05fh7rcsz6-cmfln


https://wolfram.com/xid/05fh7rcsz6-j5yb9q


https://wolfram.com/xid/05fh7rcsz6-hc4q2n

Triangulate inside the boundary of Monaco:

https://wolfram.com/xid/05fh7rcsz6-qxjpgx


https://wolfram.com/xid/05fh7rcsz6-kp3d3n

Triangulate using a minimal number of triangles:

https://wolfram.com/xid/05fh7rcsz6-w4ab7v

Triangulate so that the maximum area is at most :

https://wolfram.com/xid/05fh7rcsz6-q8drto

A nonlinear transformation of a region can be approximated by transforming vertices:

https://wolfram.com/xid/05fh7rcsz6-gz9ms1
Because there are few vertices in the mesh, the transformation is poorly approximated:

https://wolfram.com/xid/05fh7rcsz6-b4mzrs

By triangulating, a more accurate approximation may be made:

https://wolfram.com/xid/05fh7rcsz6-fhsrqv

Properties & Relations (2)Properties of the function, and connections to other functions
The output of TriangulateMesh is always a MeshRegion:

https://wolfram.com/xid/05fh7rcsz6-n6u49q

https://wolfram.com/xid/05fh7rcsz6-f1mbqc


https://wolfram.com/xid/05fh7rcsz6-828dfp

The cells in the output of TriangulateMesh are always simplices:

https://wolfram.com/xid/05fh7rcsz6-v28l2x

In 2D, simplices are triangles:

https://wolfram.com/xid/05fh7rcsz6-ts9chs

Wolfram Research (2014), TriangulateMesh, Wolfram Language function, https://reference.wolfram.com/language/ref/TriangulateMesh.html (updated 2020).
Text
Wolfram Research (2014), TriangulateMesh, Wolfram Language function, https://reference.wolfram.com/language/ref/TriangulateMesh.html (updated 2020).
Wolfram Research (2014), TriangulateMesh, Wolfram Language function, https://reference.wolfram.com/language/ref/TriangulateMesh.html (updated 2020).
CMS
Wolfram Language. 2014. "TriangulateMesh." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2020. https://reference.wolfram.com/language/ref/TriangulateMesh.html.
Wolfram Language. 2014. "TriangulateMesh." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2020. https://reference.wolfram.com/language/ref/TriangulateMesh.html.
APA
Wolfram Language. (2014). TriangulateMesh. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/TriangulateMesh.html
Wolfram Language. (2014). TriangulateMesh. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/TriangulateMesh.html
BibTeX
@misc{reference.wolfram_2025_triangulatemesh, author="Wolfram Research", title="{TriangulateMesh}", year="2020", howpublished="\url{https://reference.wolfram.com/language/ref/TriangulateMesh.html}", note=[Accessed: 19-April-2025
]}
BibLaTeX
@online{reference.wolfram_2025_triangulatemesh, organization={Wolfram Research}, title={TriangulateMesh}, year={2020}, url={https://reference.wolfram.com/language/ref/TriangulateMesh.html}, note=[Accessed: 19-April-2025
]}