TriangleGetRegions[expr]
returns the regions in a Triangle expression.
Details and Options
Examples
Basic Examples
See Also
Tech Notes
Related Guides
TriangleLink`
TriangleLink`
TriangleGetRegions
TriangleGetRegions[expr]
returns the regions in a Triangle expression.
Details and Options
- To use TriangleGetRegions, you first need to load it using Needs["TriangleLink`"].
- TriangleGetRegions allows you to retrieve regions set in Triangle instances.
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]This sets up variables that specify a point within a material domain, as well as a region attribute and a region constraint:
materialDomains = {{1.5, 1.25}};
materialDomainsRegionAttribute = {10.};
materialDomainsRegionConstraint = {0.05};The material variables are set in the Triangle instance:
TriangleSetRegions[inst, materialDomains, materialDomainsRegionAttribute, materialDomainsRegionConstraint];Retrieve the region values in a Triangle instance:
TriangleGetRegions[inst]