triangles generated by isosurface

조회 수: 5 (최근 30일)
syed
syed 2012년 6월 15일
Hi people,
I have generated an isosurface from matlab. The issue is that few of the triangles generated by the isosurface have very bad aspect ratio. i.e. the three points of some of the triangles are nearly collinear. Refining the data to generate the isosurface does not provide any help.
Could some body guide me how to conrol the aspect ratio of the triangles that define the isosurface.
Syed
  댓글 수: 1
syed
syed 2012년 6월 15일
Here is the code I used:
UnitCellCount=1;
Resolution=100;
[x, y ,z] = ndgrid([0:(1/Resolution):UnitCellCount]...
,[0:(1/Resolution):UnitCellCount],...
[0:(1/Resolution):UnitCellCount]);
t=-(cos(2*pi*x).*sin(2*pi*y)+cos(2*pi*y).*sin(2*pi*z)+cos(2*pi*z).*sin(2*pi*x));
t0=1.35;
fv3=isosurface(x,y,z,t,t0,'noshare');
patch('Vertices',fv3.vertices,'Faces',fv3.faces,'FaceColor','r','EdgeColor','none','FaceAlpha',1);
daspect([1,1,1]);
lighting gouraud
view(120,-50);
camlight left

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

채택된 답변

Anton Semechko
Anton Semechko 2012년 6월 15일
Hi Sayed, unfortunately there are no built-in Matlab functions that would allow you to regularize your mesh. There is, however, one FEX submission that you could try out. Here is the link:
  댓글 수: 1
syed
syed 2012년 6월 15일
Thanks Anton. It worked like a magic!

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Surface and Mesh Plots에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by