Note:

TR = TriRep(TRI, X, Y)
TR = TriRep(TRI, X, Y, Z)
TR = TriRep(TRI, X)
TR = TriRep(TRI, X, Y)
creates a 2D triangulation
representation from the triangulation matrix TRI
and
the vertex coordinates (X, Y)
. TRI
is
an m
by3 matrix that defines the triangulation
in facevertex 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 3D
triangulation representation from the triangulation matrix TRI
and
the vertex coordinates (X, Y, Z)
. TRI
is
an m
by3 or m
by4 matrix that
defines the triangulation in simplexvertex 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
byn
matrix that defines
the triangulation in simplexvertex 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
byndim
matrix
where mpts
is the number of points and ndim
is
the dimension of the space where the points reside, where 2 ≤ ndim
≤ 3.
Load a 3D 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);