freeBoundary

Boundary facets of a triangulation: edges of a 2-D mesh or faces of a 3-D one that touch only one simplex.

Category: Mathematics > Computational Geometry

Syntax

F = freeBoundary(TR)

Returns the free boundary facets as rows of vertex indices.

Description

A facet shared by two simplices is interior; a facet owned by a single simplex lies on the outer boundary. The free boundary therefore gives the outline of a flat mesh or the skin of a solid mesh. The edges are oriented consistently with the triangles that own them.

Input arguments

TR
A triangulation, delaunayTriangulation or legacy TriRep or DelaunayTri object.

Output arguments

F
Two columns per edge for a 2-D triangulation, three per face for a tetrahedral one. A closed triangulated surface gives an empty matrix.

Example

Outline of a square mesh

x = [0 1 1 0 0.5]';
y = [0 0 1 1 0.5]';
DT = delaunayTriangulation(x, y);
F = freeBoundary(DT)
Output
F = 4×2

     2     3
     3     4
     4     1
     1     2

See also

boundaryFacets boundaryshape edgeAttachments convexHull