edges
三角剖分边缘
说明
示例
查找二维三角剖分的边
加载二维三角剖分数据并创建三角剖分表示。
P = [2.5 8.0; 6.5 8.0; 2.5 5.0; 6.5 5.0; 1.0 6.5; 8.0 6.5]; T = [5 3 1; 3 2 1; 3 4 2; 4 6 2]; TR = triangulation(T,P);
在三角剖分中查找边的起始和终止顶点标识号。
E = edges(TR)
E = 9×2
1 2
1 3
1 5
2 3
2 4
2 6
3 4
3 5
4 6
定义三角剖分中第一个点的坐标。然后定义与第一个点共享边的三个顶点(第二个、第三个和第五个)的坐标。
startVert = TR.Points(1,:); endVert = TR.Points([2 3 5],:);
绘制该三角剖分。以绿色绘制第一个顶点,以红色绘制沿一条边的连接点。
triplot(TR) hold on plot(startVert(1,1),startVert(1,2),'g.','MarkerSize',20) plot(endVert(:,1),endVert(:,2),'r.','MarkerSize',20) hold off
输入参数
TR
— 三角剖分表示法
标量三角剖分对象
三角剖分表示法,指定为标量 triangulation
或 delaunayTriangulation
对象。
数据类型: triangulation
| delaunayTriangulation
扩展功能
基于线程的环境
使用 MATLAB® backgroundPool
在后台运行代码或使用 Parallel Computing Toolbox™ ThreadPool
加快代码运行速度。
此函数完全支持基于线程的环境。有关详细信息,请参阅在基于线程的环境中运行 MATLAB 函数。
版本历史记录
在 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)