TriRep

Legacy triangulation representation class, replaced by triangulation.

Category: Mathematics > Computational Geometry

Syntax

TR = TriRep(T, X)

Creates a triangulation representation from the connectivity T and the points X.

TR = TriRep(T, x, y)

Same, with 2-D coordinates given as separate vectors.

Description

TriRep is the older class for holding a triangulation and querying it. It stores the points in X and the connectivity in Triangulation. New code should use triangulation, whose properties are named Points and ConnectivityList, and which has more methods.

Input arguments

T
Matrix of vertex indices, three or four columns.
X
Matrix of point coordinates, one point per row.

Output arguments

TR
A TriRep object with properties X (points) and Triangulation (connectivity).

Example

Create and read a TriRep

P = [0 0; 1 0; 1 1; 0 1];
T = [1 2 3; 1 3 4];
TR = TriRep(T, P);
disp(TR.X)
Output
     0     0
     1     0
     1     1
     0     1

Notes

MATLAB keeps TriRep only for compatibility and recommends triangulation instead.

See also

triangulation delaunayTriangulation triplot