This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.


Class: triangulation

Triangulation facets referenced by only one triangle or tetrahedron


FBtri = freeBoundary(TR)
[FBtri,FBpoints] = freeBoundary(TR)


FBtri = freeBoundary(TR) returns the free boundary facets of TR.ConnectivityList. A facet in TR is on the free boundary if it is referenced by only one triangle or tetrahedron.

[FBtri,FBpoints] = freeBoundary(TR) also returns a matrix containing the vertices of the free boundary facets.

Input Arguments


Triangulation representation, see triangulation or delaunayTriangulation.

Output Arguments


Triangulation connectivity list, returned as a matrix that contains the following information:

  • Each row in FBtri represents a facet on the free boundary.

  • Each element is a Vertex ID.

The vertex IDs in FBtri reference a specific matrix, depending on the syntax you choose:

  • If you call freeBoundary with one output argument, then the elements of FBtri are row numbers of TR.Points.

  • If you call freeBoundary with two output arguments, then the elements of FBtri are row numbers of FBpoints.


Free boundary points, returned as a matrix containing the coordinates of the vertices of the free boundary facets. Each row of FBpoints contains coordinates of a vertex.


expand all

Use 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);

Use 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.

hold on;
plot(x(fe),y(fe),'-r','LineWidth',2) ; 
hold off;


expand all

Was this topic helpful?