(Will be removed) Triangulation representation
Note: TriRep will be removed in a future release. Use triangulation instead.
TriRep provides topological and geometric queries for triangulations in 2-D and 3-D space. For example, for triangular meshes you can query triangles attached to a vertex, triangles that share an edge, neighbor information, circumcenters, or other features. You can create a TriRep directly using existing triangulation data. Alternatively, you can create a Delaunay triangulation, via DelaunayTri, which provides access to the TriRep functionality.
|TriRep||(Will be removed) Triangulation representation|
|baryToCart||(Will be removed) Convert point coordinates from barycentric to Cartesian|
|cartToBary||(Will be removed) Convert point coordinates from cartesian to barycentric|
|circumcenters||(Will be removed) Circumcenters of specified simplices|
|edgeAttachments||(Will be removed) Simplices attached to specified edges|
|edges||(Will be removed) Triangulation edges|
|faceNormals||(Will be removed) Unit normals to specified triangles|
|featureEdges||(Will be removed) Sharp edges of surface triangulation|
|freeBoundary||(Will be removed) Facets referenced by only one simplex|
|incenters||(Will be removed) Incenters of specified simplices|
|isEdge||(Will be removed) Test if vertices are joined by edge|
|neighbors||(Will be removed) Simplex neighbor information|
|size||(Will be removed) Size of triangulation matrix|
|vertexAttachments||(Will be removed) Return simplices attached to specified vertices|
Value. To learn how this affects your use of the class, see Comparing Handle and Value Classes in the MATLAB® Object-Oriented Programming documentation.
TriRep objects support indexing into the triangulation using parentheses (). The syntax is the same as for arrays.
Load a 2-D triangulation and use the TriRep constructor to build an array of the free boundary edges:
This loads triangulation tri and vertex coordinates x, y:
trep = TriRep(tri, x,y); fe = freeBoundary(trep)'; triplot(trep);
You can add the free edges fe to the plot:
hold on; plot(x(fe), y(fe), 'r','LineWidth',2); hold off; axis([-50 350 -50 350]); axis equal;