Separate multiple triangulation.ConnectivityList based on connectivity
6 ビュー (過去 30 日間)
古いコメントを表示
Hello, I have a triangulation object which when plotted using the patch command produces multiple non-enclosed faceted surfaces.
I would like to find a way to separate out all discrete surfaces into distinct triangulation.ConnectivityList or triangulation objects. I started implementing this using the triangulation function isConnected(), which only considers connectivity along a single edge and ultimately begs for a recursive solution. I wondered if there was a simpler or already implemented solution to accomplish this task.
I've extended the example in triangulation doc to include two distinct faceted surfaces. Thanks in advance for your help!
P = [ 2.5 8.0 1
6.5 8.0 1
2.5 5.0 1
6.5 5.0 1
1.0 6.5 1
8.0 6.5 1];
P = [ P;
2.5 8.0 3
6.5 8.0 3
2.5 5.0 3
6.5 5.0 3
1.0 6.5 3
8.0 6.5 3]
T = [5 3 1;
3 2 1;
3 4 2;
4 6 2];
T = [T;
11 9 7;
9 8 7;
9 10 8;
10 12 8]
TR = triangulation(T,P)
h1 = patch('faces',TR.ConnectivityList,'vertices',TR.Points);
set(h1,'FaceColor',[.89 .855 .788], 'FaceLighting','gouraud','EdgeColor','none','FaceAlpha',0.5,'SpecularStrength',.1);
lighting phong;
axis equal
xlabel('x');ylabel('y');zlabel('z')
view([0 40])
0 件のコメント
採用された回答
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Surface and Mesh Plots についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!