voronoiDiagram
德劳内三角剖分的沃罗诺伊图
说明
示例
二维德劳内三角剖分
计算二维德劳内三角剖分的沃罗诺伊顶点和区域。
基于一组二维点创建德劳内三角剖分。
P = [ 0.5 0 0 0.5 -0.5 -0.5 -0.2 -0.1 -0.1 0.1 0.1 -0.1 0.1 0.1 ]; DT = delaunayTriangulation(P);
计算沃罗诺伊顶点和区域。
[V,r] = voronoiDiagram(DT);
显示与三角剖分中第三个点关联的沃罗诺伊区域的连接。
r{3}
ans = 1×4
1 6 10 3
显示约束第三个区域的沃罗诺伊顶点的坐标。Inf
值指出该区域包含凸包上的点。
V(r{3},:)
ans = 4×2
Inf Inf
0.7000 -1.6500
-0.0500 -0.5250
-1.7500 0.7500
输入参数
DT
— 德劳内三角剖分
标量
德劳内三角剖分,指定为标量 delaunayTriangulation
对象。
数据类型: delaunayTriangulation
输出参量
V
— 沃罗诺伊顶点
矩阵
沃罗诺伊顶点,以两列矩阵(二维)或三列矩阵(三维)形式返回。V
内的每一行包含一个沃罗诺伊顶点的坐标。
与位于三角剖分顶点凸包上的点相关联的沃罗诺伊区域无边界。这些区域的边界发散至无穷。V
中的第一个顶点代表无穷远处的顶点,用 Inf
表示。
数据类型: double
r
— 沃罗诺伊区域
元胞数组
沃罗诺伊区域,以元胞数组形式返回,其元素包含 V
中沃罗诺伊顶点的连接。r
的每一行中的点形成与 Points
属性中相应行关联的边界区域。
数据类型: double
扩展功能
基于线程的环境
使用 MATLAB® backgroundPool
在后台运行代码或使用 Parallel Computing Toolbox™ ThreadPool
加快代码运行速度。
版本历史记录
在 R2013a 中推出
MATLAB 命令
您点击的链接对应于以下 MATLAB 命令:
请在 MATLAB 命令行窗口中直接输入以执行命令。Web 浏览器不支持 MATLAB 命令。
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)