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

5 visualizaciones (últimos 30 días)
Sebastian
Sebastian el 28 de Mzo. de 2019
Comentada: Sebastian el 29 de Mzo. de 2019
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 comentario
Sebastian
Sebastian el 29 de Mzo. de 2019
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.

Iniciar sesión para comentar.

Respuestas (0)

Categorías

Más información sobre Surface and Mesh Plots en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by