TriangleTriangulate
TriangleTriangulate[expr,settings]
triangulates a Triangle expression using settings and returns the result in a new Triangle expression.
Details and Options
- To use TriangleTriangulate, you first need to load it using Needs["TriangleLink`"].
- The settings given to TriangleTriangulate are a string of different commands:
-
"p" triangulate a planar straight line graph (PLC) "q" quality mesh generation with no angles smaller than 20 degrees; an alternate minimum angle may be specified after the "q" "a" impose a maximum triangle area constraint; a fixed area constraint (that applies to every triangle) may be specified after the "a" "A" assign a regional attribute to each triangle that identifies what segment-bounded region it belongs to "c" enclose the convex hull with segments "D" conforming Delaunay: if all triangles in the mesh are to be Delaunay, not just constrained Delaunay, or if you want to ensure that all Voronoi vertices lie within the triangulation "r" refine a previously generated mesh "Y" prohibit the insertion of Steiner points on the mesh boundary; if specified twice ("YY"), it prohibits the insertion of Steiner points on any segment, including internal segments "S" specify the maximum number of added Steiner points "o2" generate second-order subparametric elements with six nodes each "C" check the consistency of the final mesh "Q" quiet: no terminal output except error - TriangleTriangulate has the following options:
-
"TriangleRefinement" None function to refine a triangle
Examples
open allclose allBasic Examples (1)
This creates an instance of a Triangle expression:
This sets up points and segments to use:
This sets the points and facets in the Triangle instance:
This carries out the triangulation, returning a new Triangle instance:
This extracts the points and elements from the triangulation:
With the following support function, you can visualize the triangles:
Options (1)
"TriangleRefinement" (1)
This creates an instance of a Triangle expression:
This sets up points and segments to use:
This sets the points and facets in the Triangle instance:
This carries out the triangulation, returning a new Triangle instance:
This extracts the points and elements from the triangulation:
With the following support function, you can visualize the triangles:
This sets up a compiled function that returns True if a triangle should be refined and False otherwise:
This carries out the triangulation with the refinement function, returning a new Triangle instance:
This extracts the points and elements from the triangulation:
Neat Examples (1)
Use a black-and-white image as a refinement driver. Set an image, create a distance function, and visualize the distance function:
Create an InterpolatingFunction from the distance function:
Create and populate a Triangle instance:
Set up a compiled function that calls the InterpolatingFunction:
This carries out the triangulation with the refinement function, returning a new Triangle instance:
This extracts the points and elements from the triangulation:
Text
Wolfram Research (2014), TriangleTriangulate, Wolfram Language function, https://reference.wolfram.com/language/TriangleLink/ref/TriangleTriangulate.html.
CMS
Wolfram Language. 2014. "TriangleTriangulate." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/TriangleLink/ref/TriangleTriangulate.html.
APA
Wolfram Language. (2014). TriangleTriangulate. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/TriangleLink/ref/TriangleTriangulate.html