帮助中心帮助中心
测试两个顶点是否通过一条边相连接
TF = isConnected(TR,startID,endID)
TF = isConnected(TR,E)
示例
TF = isConnected(TR,startID,endID) 返回一个 logical 列向量,当指定的一对起始和终止顶点由一条边连接时,其元素为 1 (true)。startID 和 endID 通过边的起点和终点指定边,其中每个点由 TR.Points 中的行号表示。返回值 ID 通过标识号来标识三角形。
TF
TR
startID
endID
logical
true
TR.Points
ID
TF = isConnected(TR,E) 指定两列矩阵 E 中边的起始和终止顶点 ID。
E
全部折叠
加载二维三角剖分。
load trimesh2d TR = triangulation(tri,x,y);
确定顶点 3 和 117 是否通过边相连接。
3
117
TF = isConnected(TR,3,117)
TF = logical 1
确定顶点 3 和 164 是否通过边相连接。
164
TF = isConnected(TR,3,164)
TF = logical 0
创建三维 Delaunay 三角剖分。
rng default; X = rand([10,3]); DT = delaunayTriangulation(X);
确定顶点 2 和 7 是否由一条边连接,以及顶点 4 和 9 是否连接。
2
7
E = [2 7; 4 9]; TF = isConnected(DT,E)
TF = 2x1 logical array 0 1
三角剖分表示法,指定为标量 triangulation 或 delaunayTriangulation 对象。
triangulation
delaunayTriangulation
数据类型: triangulation | delaunayTriangulation
每条边的起始顶点标识,指定为列向量。顶点标识号是 Points 属性中与该顶点对应的行号。
Points
数据类型: double
double
每条边的终止顶点标识,指定为列向量。顶点标识号是 Points 属性中与该顶点对应的行号。
边矩阵,指定为两列矩阵。每行包含一条边的起始和终止顶点标识。顶点标识号是 Points 属性中与该顶点对应的行号。
backgroundPool
ThreadPool
在 R2013a 中推出
edges | edgeAttachments | delaunayTriangulation | triangulation
edges
edgeAttachments
您点击的链接对应于以下 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:
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Contact your local office