Accelerating the pace of engineering and science

# TriRep

Class: TriRep

(Will be removed) Triangulation representation

 Note:   TriRep will be removed in a future release. Use triangulation instead.

## Syntax

TR = TriRep(TRI, X, Y)
TR = TriRep(TRI, X, Y, Z)
TR = TriRep(TRI, X)

## Description

TR = TriRep(TRI, X, Y) creates a 2-D triangulation representation from the triangulation matrix TRI and the vertex coordinates (X, Y). TRI is an m-by-3 matrix that defines the triangulation in face-vertex format, where m is the number of triangles. Each row of TRI is a triangle defined by indices into the column vector of vertex coordinates (X, Y).

TR = TriRep(TRI, X, Y, Z) creates a 3-D triangulation representation from the triangulation matrix TRI and the vertex coordinates (X, Y, Z). TRI is an m-by-3 or m-by-4 matrix that defines the triangulation in simplex-vertex format, where where m is the number of simplices; triangles or tetrahedra in this case. Each row of TRI is a simplex defined by indices into the column vector of vertex coordinates (X, Y, Z).

TR = TriRep(TRI, X) creates a triangulation representation from the triangulation matrix TRI and the vertex coordinates X. TRI is an m-by-n matrix that defines the triangulation in simplex-vertex format, where m is the number of simplices and n is the number of vertices per simplex. Each row of TRI is a simplex defined by indices into the array of vertex coordinates X. X is an mpts-by-ndim matrix where mpts is the number of points and ndim is the dimension of the space where the points reside, where 2 ≤ ndim ≤ 3.

## Examples

Load a 3-D tetrahedral triangulation compute the free boundary. First, load triangulation tet and vertex coordinates X.

`load tetmesh`

Create the triangulation representation and compute the free boundary.

```trep = TriRep(tet, X);
[tri, Xb] = freeBoundary(trep);```