Class: TriRep

(Will be removed) Simplices attached to specified edges


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


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.


A simplex is a triangle/tetrahedron or higher dimensional equivalent.


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);

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);
Was this topic helpful?