edgeAttachments

Class: TriRep

(Not recommended) Simplices attached to specified edges

Compatibility

Note

edgeAttachments(TriRep) is not recommended. Use edgeAttachments(triangulation) instead.

TriRep is not recommended. Use triangulation instead.

Syntax

SI = edgeAttachments(TR, V1, V2)
SI = edgeAttachments(TR, EDGE)

Description

SI = edgeAttachments(TR, V1, V2) returns the simplices SI attached to the edges specified by (V1, V2). (V1, V2) represents the start and end vertices of the edges to be queried.

SI = edgeAttachments(TR, EDGE) specifies edges in matrix format.

Input Arguments

TRTriangulation representation.
V1,V2Column vectors of vertex indices into the array of points representing the vertex coordinates.
EDGEMatrix specifying edge start and end points. EDGE is of size m-by-2, m being the number of edges to query.

Output Arguments

SIVector cell array of indices into the triangulation matrix. SI is a cell array because the number of simplices associated with each edge can vary.

Examples

Example 1

Load a 3-D triangulation to compute the tetrahedra attached to an edge.

load tetmesh
trep = TriRep(tet, X);
v1 = [15 21]';
v2 = [936 716]';
t1 = edgeAttachments(trep, v1, v2);

You can also specify the input as edges.

e = [v1 v2];
t2 = edgeAttachments(trep, e);
isequal(t1,t2);

Example 2

Create a triangulation with DelaunayTri.

x = [0 1 1 0 0.5]';
y = [0 0 1 1 0.5]';
dt = DelaunayTri(x,y);

Query the triangles attached to edge (1,5).

t = edgeAttachments(dt, 1,5);
t{:};

More About

expand all