当前位置:   article > 正文

Matlab:创建和编辑 Delaunay 三角剖分_matlab 边约束三角分割

matlab 边约束三角分割


此示例说明如何使用 delaunayTriangulation 类创建、编辑和查询 Delaunay 三角剖分。Delaunay 三角剖分是科学计算中使用最广泛的三角剖分。与三角剖分关联的属性提供了解决各种几何问题的基础。此外,还说明了如何构造受约束的 Delaunay 三角剖分,同时提供了一个涵盖中轴计算和网格变换的应用程序。

示例一:创建和绘制二维 Delaunay 三角剖分

此示例说明如何计算二维 Delaunay 三角剖分,然后同时对三角剖分以及顶点和三角标签绘图。

rng default
x = rand(10,1);
y = rand(10,1);
dt = delaunayTriangulation(x,y)
  • 1
  • 2
  • 3
  • 4

dt =
delaunayTriangulation with properties:

          Points: [10x2 double]
ConnectivityList: [11x3 double]
     Constraints: []
  • 1
  • 2
  • 3
triplot(dt)
  • 1

在图上显示顶点和三角标签。

hold on
vxlabels = arrayfun(@(n) {sprintf('P%d', n)}, (1:10)');
Hpl = text(x,y,vxlabels,'FontWeight','bold','HorizontalAlignment',...
   'center','BackgroundColor','none');
ic = incenter(dt);
numtri = size(dt,1);
trilabels 
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/秋刀鱼在做梦/article/detail/876741
推荐阅读
相关标签
  

闽ICP备14008679号