isEdge

Tests whether pairs of vertices form an edge of a legacy DelaunayTri or TriRep triangulation.

Category: Mathematics > Computational Geometry

Syntax

tf = isEdge(TR, v1, v2)

true for each pair v1(i), v2(i) that is an edge.

tf = isEdge(TR, E)

Pairs given as the rows of a two-column matrix.

Description

isEdge is the older name of what isConnected does for the newer triangulation classes. Two vertices form an edge when some triangle of the mesh has them as adjacent corners. A false answer does not mean the points are far apart, only that no triangle links them.

Input arguments

TR
A DelaunayTri or TriRep object.
v1, v2
Vertex indices, as vectors of the same length.

Output arguments

tf
Logical column vector, one value per pair.

Example

Edge or not

x = [0 1 1 0 0.5]';
y = [0 0 1 1 0.5]';
DL = DelaunayTri(x, y);
tf = isEdge(DL, [1 1], [2 3])
Output
tf = 2×1 logical array

   1
   0

See also

isConnected edges DelaunayTri