inOutStatus

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

Category: Mathematics > Computational Geometry

Syntax

IN = inOutStatus(DT)

Returns a logical value for every triangle of the legacy DelaunayTri object DT.

Description

When constraint edges enclose a domain, the triangulation still fills the whole convex hull of the points. inOutStatus tells which triangles belong to the enclosed domain, with nested loops counting as holes (inside, outside, inside again). It is how a mesh of a shape with holes is cut out of the full triangulation. The newer equivalent is isInterior.

Input arguments

DT
A 2-D DelaunayTri created with constraint edges that form closed loops.

Output arguments

IN
Logical column vector, one entry per triangle: true when the triangle is inside the domain bounded by the constraints.

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
  DL = DelaunayTri(P, C);
  IN = inOutStatus(DL)
catch ME
  disp(ME.message)
end
Output
isInterior requires a constrained Delaunay triangulation, which is not supported in this version.

In MATLAB this prints one logical value per triangle. MatLivre has no constrained triangulation and reports an error message instead.

Notes

Not functional in MatLivre: constrained Delaunay triangulations are unsupported, so calling it raises an error.

See also

isInterior DelaunayTri delaunayTriangulation inpolygon