# 3D surface triangulation

조회 수: 46 (최근 30일)
Hosna Ghaderi 2023년 9월 5일
댓글: Hosna Ghaderi 2023년 9월 20일
Hello, i have a point clould of a sphere which has a hole in it. the mat file of the points is attahced. I am trying to triangulate it. I have been useing several methods but it can be done correctly. Finally i found Robust crust code which can do it but it fills the hole as well. i attached the functions as well. Is there any one that could help to solve this issue?
XX1 = p1(:,1);
YY1 = p1(:,2);
ZZ1 = p1(:,3);
p1=[XX1,YY1,ZZ1];
p1 = unique(p1,'rows');
[t1]=Traingulationnn(p1);

댓글을 달려면 로그인하십시오.

### 답변 (2개)

John D'Errico 2023년 9월 5일
편집: John D'Errico 2023년 9월 5일
What is the problem? Just delete any triangles with edges that are long. Since the CRUST code will span that hole, any triangles crossing the hole will have at least one long edge. Zap them away. Problem solved. All you need do is decide on a parameter for how long an edge needs to be to want to delete the corresponding triangle. Surely you can do that much?
plot3(p1(:,1),p1(:,2),p1(:,3),'.')
So, knowing the hole on the bottom is what you wish to zap away, I would guess that any triangle with an edge longer than something like 5-10 units will let you kill off the offending triangles. 10 units may be a little too large. 5 is probably adequate. A quick experiment would allow you to choose something intelligent, based on your own eyes.
##### 댓글 수: 1이전 댓글 -1개 표시이전 댓글 -1개 숨기기
Hosna Ghaderi 2023년 9월 20일
Thank you for your reply, i want to know how to modify this solution in CRUST code as i am going to use it for other clouds with different shapes as well.

댓글을 달려면 로그인하십시오.

Richard Burnside 2023년 9월 5일
XX1 = p1(:,1);
YY1 = p1(:,2);
ZZ1 = p1(:,3);
p1=[XX1,YY1,ZZ1];
p1 = unique(p1,'rows');
T = delaunay(p1(:,1),p1(:,2));
trisurf(T,p1(:,1),p1(:,2),p1(:,3));

댓글을 달려면 로그인하십시오.

### 카테고리

Help CenterFile Exchange에서 Delaunay Triangulation에 대해 자세히 알아보기

### Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by