How to obtain a triangle pair which have a shared edge from Delaunay Triangulation
5 次查看(过去 30 天)
显示 更早的评论
Hello everyone
I want to obtain triangles which are from triangle set obtained from Delaunay Triangulation. I wrote the following code. How can I obtain triangles which have a shred edge with each other?
0 个评论
采纳的回答
Chunru
2021-5-30
After you obtain DT, you can use the following command to get the ID of the triangles in DT.ConnectivityList.
P = rand([5 2]);
DT = delaunayTriangulation(P);
triplot(DT)
text(DT.Points(:,1), DT.Points(:,2), string(1:5)')
ID = edgeAttachments(1,5); % Choose edge from point 1 to point 5
ID = edgeAttachments(DT, 1,5); % Triangle IDs attached to the edge 1-5
DT.ConnectivityList(ID{:}, :) % Show the vertex ids of the attached triangles
2 个评论
Chunru
2021-5-31
edgeAttachements is Introduced in R2013a. Before testing, do the following:
clear all
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Delaunay Triangulation 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!