필터 지우기
필터 지우기

trimesh and trisurf produces a very bad triangulation results?!!

조회 수: 5 (최근 30일)
Ano
Ano 2017년 3월 13일
답변: Ano 2017년 3월 15일
Hello! I am trying to model a closed surface, but trimesh and trisurf produces a very bad plot, how can I improve it?: is there any other functions to use instead ?! Thank you!! Note: below is the code I am using:
figure(1)
trisurf(t,p(1,:),p(2,:),p(3,:));title('ploted using trisurf ')
figure(2)
trimesh(t,p(1,:),p(2,:),p(3,:));title('ploted using trimesh ')
  댓글 수: 2
KSSV
KSSV 2017년 3월 13일
trisurf, trimesh plots only what you give. If you want a good plot, you need to increase the data points. By the way, why you feel that plot is bad?
John D'Errico
John D'Errico 2017년 3월 13일
편집: John D'Errico 2017년 3월 13일
The problem is NOT trimesh or trisurf. It is in how you created the input to those tools.
A closed surface? Unless you have a triangulation that corresponds to a closed surface, then you can't expect much. So how did you generate t?
My guess is you used delaunay or some tool like it, but in a way that is not valid to produce a closed surface. Or possibly you used a convex hull tool, on a strongly non-convex set of points.
We cannot know what you did here. It would help if you:
1. Attach (using the paper clip icon) to a comment a .mat file that contains the data.
2. Show us how you generated t. Show the complete code, not just the code you used to plot it.

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

채택된 답변

Ano
Ano 2017년 3월 15일
hello! the problem was that the triangles contained not only the nodes but also their domain number (inside or out side the object) so when I used only the nodes of the triangle it worked perfectely using:
(I meant by bad it generates parallelogram instead of triangles)
figure(1) trisurf(t(1:3,:),p(1,:),p(2,:),p(3,:));title('ploted using trisurf ')

추가 답변 (0개)

카테고리

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

태그

Community Treasure Hunt

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

Start Hunting!

Translated by