Using TriangleLink

This section shows some of the ways that TriangleLink can be applied.

Convex Hull

To use TriangleLink, it must first be loaded.

Next, some random points are generated and displayed.

Now you can compute the convex hull of the 3D points. TriangleConvexHull will return a list of points and segments.

Each segment is a list of two integers. These integers refer to the coordinates. You can plot them by using GraphicsComplex.

Delaunay Triangulation

To use TriangleLink, it must first be loaded.

This creates some 2D data.

You can compute the Delaunay triangulation of the data with TriangleDelaunay.

The result is a list of points and triangles. The list of triangles is a list of three integers that refer to the coordinate positions. To visualize the triangle as a wireframe, you can use Polygon.

Meshing a Rectangle (Basic)

This loads the package.

First, an instance of a triangle expression is created.

Next, coordinates and line segments are specified.

These are then set into the triangle instance.

The actual triangulation is then done with TriangleTriangulate and a set of string parameters (Triangle string codes).

The data can be extracted from the triangle instance.

A visualization of the triangle mesh.