www.gusucode.com > matlab 案例源码 matlab代码程序 > matlab/ThreeDimensionalDelaunayTriangulationExample.m
%% 3-D Delaunay Triangulation % Create a 3-D |delaunayTriangulation| for 30 random points. % Copyright 2015 The MathWorks, Inc. %% x = gallery('uniformdata',[30 1],0); y = gallery('uniformdata',[30 1],1); z = gallery('uniformdata',[30 1],2); DT = delaunayTriangulation(x,y,z) %% % Plot the triangulation at 30% opacity with a light blue face color. faceColor = [0.6875 0.8750 0.8984]; figure tetramesh(DT,'FaceColor',faceColor,'FaceAlpha',0.3);