MATLAB 帮助中心
本页翻译不是最新的。点击此处可查看最新英文版本。
连接到指定边缘的三角形或四面体
ID = edgeAttachments(TR,startID,endID)
ID = edgeAttachments(TR,E)
ID = edgeAttachments(TR,startID,endID) 标识连接到指定边的三角形或四面体。startID 和 endID 按起点和终点指定边,其中每个点由 TR.Points 中的对应行号表示。返回值 ID 通过标识号来标识三角形。
TR
startID
endID
TR.Points
ID
示例
ID = edgeAttachments(TR,E) 指定两列矩阵 E 中每个边的起始和终止顶点。
E
全部折叠
创建一个德劳内三角剖分并对其绘图。
x = [0 1 1 0 0.5]'; y = [0 0 1 1 0.5]'; TR = delaunayTriangulation(x,y); triplot(TR)
计算与起点 (0,0) 和终点 (0.5,0.5) 所定义的边相连的三角形的标识。这两个点的顶点标识分别是 1 和 5。
ID = edgeAttachments(TR,1,5); ID{:}
ans = 1×2 4 1
ConnectivityList 属性指示各个三角形中的顶点。第四个三角形由顶点 (0.5,0.5)、(0,0) 和 (1,0) 定义,第一个三角形由顶点 (0,1)、(0,0) 和 (0.5,0.5) 定义。
ConnectivityList
TR.ConnectivityList
ans = 4×3 4 1 5 4 5 3 5 2 3 5 1 2
ans = 5×2 0 0 1.0000 0 1.0000 1.0000 0 1.0000 0.5000 0.5000
加载二维三角剖分数据并创建三角剖分表示。
load tetmesh TR = triangulation(tet,X);
通过起始和终止顶点标识选择两条边。
startID = [15; 21]; endID = [936; 716];
了解边的连接情况,并检查连接到各条边的三角形的标识。
ID = edgeAttachments(TR,startID,endID); ID{1}
ans = 1×6 927 2060 3438 3423 2583 4690
ID{2}
ans = 1×5 2652 3946 3953 4665 4218
三角剖分表示法,指定为标量 triangulation 或 delaunayTriangulation 对象。
triangulation
delaunayTriangulation
数据类型: triangulation | delaunayTriangulation
每条边的起始顶点标识,指定为列向量。顶点标识号是 Points 属性中与该顶点对应的行号。
Points
数据类型: double
double
每条边的终止顶点标识,指定为列向量。顶点标识号是 Points 属性中与该顶点对应的行号。
边矩阵,指定为两列矩阵。每行包含一条边的起始和终止顶点标识。顶点标识号是 Points 属性中与该顶点对应的行号。
全部展开
backgroundPool
ThreadPool
在 R2013a 中推出
edges | vertexAttachments | delaunayTriangulation | triangulation
edges
vertexAttachments
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
选择网站
选择网站以获取翻译的可用内容,以及查看当地活动和优惠。根据您的位置,我们建议您选择:。
您也可以从以下列表中选择网站:
如何获得最佳网站性能
选择中国网站(中文或英文)以获得最佳网站性能。其他 MathWorks 国家/地区网站并未针对您所在位置的访问进行优化。
美洲
欧洲
亚太
联系您当地的办事处