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.
How can I obtain a triangular surface mesh from a surface plot?
18 次查看(过去 30 天)
显示 更早的评论
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
回答(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!