Finding lists of connected triangles in TriRep class
이전 댓글 표시
Hi
I have a triangle mesh of type TriRep. I have selected few faces (or triangles) out based on some criteria. These few triangles are in connected groups. I want to find out how many groups of these triangles are there.
neighbors(tris,selectedFaces) Only give me connectivity of one triangle. e.g.
3 NaN 2
NaN NaN 1
1 11 4
NaN 12 3
% where tris is the TriRep triangular representation
and selectedFaces is the list of few selected faces in TriRep
The output above means that 1st face (1st row of the output) in selectedFaces has 3rd and 2nd face as neighbors and is not connected at one edge.
We can also see that face 3 (third row of the output) is connected to face 11 and 4 and face 4 (4th row of the output) is connected to 12 in addition to 3.
So this means that faces 1,2,3,4,11,12 form a group or a chain of triangles. I want to know if there is any way to find out this connectivity without using any adjacency matrix or Warshall's algorithms.
Any help is appreciated.
Best Regards
Wajahat
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Construction에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!