Effacer les filtres
Effacer les filtres

3D Delaunay Triangulation Error/Weirdness

5 vues (au cours des 30 derniers jours)
John Shackleton
John Shackleton le 11 Août 2020
Hey everyone,
I want to use the delaunay triangulation function to triangulate a sphere, but I'm getting some weird triangles/resutls i.e.:
From:
[x, y, z] = sphere(100);
D = delaunay(x(:) ,y(:), z(:));
hidden on
trimesh(D,x,y,z)
Is there any way to make the triangulation more regular so that most connections appear like:
As in are there other functions, parameters, ways to do this?
I noticed that the 2D delaunay looks better when plotted as in:
[x, y, z] = sphere(100);
D = delaunay(x(:) ,y(:));
hidden on
trimesh(D,x,y,z)
But, I want the manifold geometry to be contained in the triangulation, and I don't believe this would incorporate that (i.e. there would be no difference in output of delaunay if it was actually an ellipse along the z axis).

Réponses (1)

Pratyush Roy
Pratyush Roy le 2 Sep 2020
Since the number of faces is set to 100 for the given sphere function, the triangulation has become highly dense.
Here are some possible workarounds:
  1. Set the axis lengths to be equal such that all the axes are scaled equally.
  2. Change the figure size.
  3. Changing the number of faces to a smaller value.
The following code snippet might be helpful
[x, y, z] = sphere(100);
D = delaunay(x(:),y(:),z(:));
trimesh(D,x,y,z);
set(gcf, 'Position', [100, 100, 700, 600]);
axis equal;

Catégories

En savoir plus sur Delaunay Triangulation dans Help Center et File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by