How can I obtain a triangular surface mesh from a surface plot?

조회 수: 6 (최근 30일)
Sebastian
Sebastian 2019년 3월 28일
댓글: Sebastian 2019년 3월 29일
Hi everyone,
I was wondering if someone knows how to solve this problem. I would like to get a triangulation of a surface plot, that is generated by revolution of a profile curve, using the cylinder function, such as:
t = 0:pi/10:2*pi;
figure
[X,Y,Z] = cylinder(2+cos(t));
surf(X,Y,Z)
axis square
Specifically I would like to obtain a surface triangulation (composed of faces and vertices) on which I can then calculate the surface curvature. For instance using the curvature estimation function from "Itzik Ben Shabat":
https://www.mathworks.com/matlabcentral/fileexchange/47134-curvature-estimationl-on-triangle-mesh
I already tried searching for solutions in the forum but with little success.
It would be great if some of you has an answer to this or could point me in the right direction.
Cheers,
Sebastian
  댓글 수: 1
Sebastian
Sebastian 2019년 3월 29일
Eventually I found a solution on FileExchange: the "surf2stl" function from "Bill McDonald" generates a triangular mesh from a meshgrid that can than be reimported with "stlread". Perhaps not the most elegant solution but it is doing the trick.

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

답변 (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