주요 콘텐츠

Delaunay Triangulation of 3-D Points

Create and plot the Delaunay triangulation of 3-D points by using delaunayTriangulation.

rng("default")
P = rand(30,3);
DT = delaunayTriangulation(P)
DT = 
  delaunayTriangulation with properties:

              Points: [30×3 double]
    ConnectivityList: [102×4 double]
         Constraints: []

faceColor  = [0.6875 0.8750 0.8984];
tetramesh(DT,FaceColor=faceColor,FaceAlpha=0.3)

Figure contains an axes object. The axes object contains 102 objects of type patch.

The tetramesh function plots both the internal and external faces of the triangulation. For large 3-D triangulations, plotting the internal faces might be an unnecessary use of resources. A plot of the boundary might be more appropriate. You can use the freeBoundary method to get the boundary triangulation in matrix format. Then pass the result to trimesh or trisurf.