- Set the axis lengths to be equal such that all the axes are scaled equally.
- Change the figure size.
- Changing the number of faces to a smaller value.
3D Delaunay Triangulation Error/Weirdness
5 次查看(过去 30 天)
显示 更早的评论
Hey everyone,
I want to use the delaunay triangulation function to triangulate a sphere, but I'm getting some weird triangles/resutls i.e.:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/344710/image.png)
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:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/344713/image.png)
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).
0 个评论
回答(1 个)
Pratyush Roy
2020-9-2
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:
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;
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Delaunay Triangulation 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!