Matlab之创建和编辑Delaunay三角剖分
1、示例一:创建并绘制2D Delaunay三角剖分本示例说明如何计算2D Delaunay三角剖分以及如何将三角剖分与顶点和三角形标签一起绘制。在命令行窗口,输入命令:x = rand(10,1);y = rand(10,1);dt = delaunayTriangulation(x,y)按“Enter键”。如图1所示。

3、示例二:创建并绘制3D Delaunay三角剖分本示例向您展示如何计算3D Delaunay三角剖分以及如何绘制三角剖分。在命令行窗口,输入命令:X = rand(10,3)按“Enter键”。如图3所示。

5、在命令行窗口,输入命令:tetramesh(dt, 'FaceColor&拭貉强跳#39;, 'cyan');% To display large tetrahedral meshes use the convexHull method to% compute the boundary triangulation and plot it using trisurf.% For example;% triboundary = convexHull(dt)% trisurf(triboundary, X(:,1), X(:,2), X(:,3), 'FaceColor', 'cyan')按“Enter键”。如图5所示。

7、在命令行窗口,输入命令:dt = delaunayTriangulation(X)按“Enter键”。如图7所示。

9、在命令行窗口,输入命令:% Indexing is a shorthand way to query the triangulation. The format 足毂忍珩is% dt(i, j) where j is the j'th vertex of the i'th triangle, standard% indexing rules apply.% The triangulation datastructure isdt(:,:)按“Enter键”。如图9所示。

11、第二个三角形的第三个顶点是;在命令行窗口,输入命令:dt(2,3)按“Enter键”。如图11所示。
