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?
5 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
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
Réponses (0)
Voir également
Catégories
En savoir plus sur Surface and Mesh Plots dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!