TriangleGetHoles[expr]
returns the holes in a Triangle expression.
Details and Options
Examples
Basic Examples
See Also
Tech Notes
Related Guides
TriangleLink`
TriangleLink`
TriangleGetHoles
TriangleGetHoles[expr]
returns the holes in a Triangle expression.
Details and Options
- To use TriangleGetHoles, you first need to load it using Needs["TriangleLink`"].
- TriangleGetHoles indicates to Triangle where a hole in a mesh is to be placed.
Examples
Basic Examples (1)
To use TriangleLink, it must first be loaded:
Needs["TriangleLink`"]Start by specifying the coordinates and displaying them:
pts = {{0., 0.}, {3., 0.}, {3., 3.}, {0., 3.}, {1., 1.}, {2., 1.}, {2., 2.}, {1., 2.}}Graphics[{Red, PointSize[0.02], Point[pts]}]Then create the input instance and set the points:
inst = TriangleCreate[]TriangleSetPoints[inst, pts]Next, the list of segments is created:
segments = {{1, 2}, {2, 3}, {3, 4}, {4, 1}, {5, 6}, {6, 7}, {7, 8}, {8, 5}}Graphics[{ Opacity[0.25], GraphicsComplex[pts, Line[segments]]}]Set the segments in the input instance of Triangle:
TriangleSetSegments[inst, segments]Set the region holes in the Triangle input instance with the TriangleSetHoles command:
holes = {{1.5, 1.5}};
TriangleSetHoles[inst, holes]With TriangleGetHoles, you can retrieve the value set in the Triangle instance:
TriangleGetHoles[inst]Here is a picture of the bounding facet and the facet hole position:
Graphics[ {{Red, PointSize[0.04], Point[holes]}, GraphicsComplex[pts, Line[segments]]}]