Query free boundary facets
FBtri = freeBoundary(TR)
[FBtri,FBpoints] = freeBoundary(TR)
also returns a matrix containing the vertices of the free boundary facets.
[FBtri,FBpoints] = freeBoundary(
Triangulation connectivity list, returned as a matrix that contains the following information:
The vertex IDs in
Free boundary points, returned as a matrix containing the coordinates
of the vertices of the free boundary facets. Each row of
freeBoundary to extract the facets of a 3-D triangulation that cover the surface of an object.
Load a 3-D triangulation.
load tetmesh; TR = triangulation(tet,X);
Compute the boundary triangulation.
[FBtri,FBpoints] = freeBoundary(TR);
Plot the boundary triangulation.
trisurf(FBtri,FBpoints(:,1),FBpoints(:,2),FBpoints(:,3), ... 'FaceColor','cyan','FaceAlpha', 0.8);
freeBoundary when you want to highlight the outer edges of a 2-D Delaunay triangulation.
Create a triangulation from a random set of points.
x = gallery('uniformdata',[20,1],0); y = gallery('uniformdata',[20,1],1); DT = delaunayTriangulation(x,y);
Find the free boundary edges.
fe = freeBoundary(DT)';
Plot the mesh and highlight the free boundary edges in red.
triplot(DT); hold on; plot(x(fe),y(fe),'-r','LineWidth',2) ; hold off;
A row number of the matrix,
Use this ID to refer a specific vertex in the triangulation.