isInterior

Flags the triangles of a constrained Delaunay triangulation that lie inside the constrained region.

Category: Mathematics > Computational Geometry

Syntax

IN = isInterior(DT)

Logical value for every triangle of the 2-D delaunayTriangulation DT.

Description

A Delaunay triangulation always covers the convex hull of the points. Constraint edges that form closed polygons mark an inner domain, and isInterior separates the triangles inside it from those outside, such as in the notch of a concave shape or in a hole. Indexing the connectivity list with the result, DT.ConnectivityList(IN, :), gives the mesh of the domain.

Input arguments

DT
A 2-D delaunayTriangulation built with constraint edges that form closed loops.

Output arguments

IN
Logical column vector: true for triangles inside the domain bounded by the constraints, with nested loops treated as holes.

Example

Behavior in MatLivre

P = [0 0; 4 0; 4 4; 0 4; 1 1; 3 1; 3 3; 1 3];
C = [1 2; 2 3; 3 4; 4 1; 5 6; 6 7; 7 8; 8 5];
try
  DT = delaunayTriangulation(P, C);
  IN = isInterior(DT)
catch ME
  disp(ME.message)
end
Output
isInterior requires a constrained Delaunay triangulation, which is not supported in this version.

In MATLAB this returns the inside/outside flag of each triangle. MatLivre has no constrained triangulation and reports an error message instead.

Notes

Not functional in MatLivre: constrained Delaunay triangulations are unsupported, so the call raises an error. The constraint input of delaunayTriangulation is also ignored.

See also

inOutStatus delaunayTriangulation isinterior freeBoundary