How to take some points uniformly on the surface of the 3D model
15 次查看(过去 30 天)
显示 更早的评论
I have an irregular three-dimensional surface, which includes points and surfaces. Now I want to evenly take some points on the surface of the model, and the interval between these points is 1 cm. I hope that the distance between them is the shortest distance along the surface of the model, rather than the space distance. The effect I want to achieve is shown in the image below, where yellow is the evenly distributed points.
What should I do specifically? Thank you!
2 个评论
采纳的回答
George Abrahams
2024-1-10
编辑:George Abrahams
2024-1-10
Firstly, I'm assuming your model is in a triangular mesh format. If it's a point cloud, you can triangulate it with the alphaShape function. If it's a volume, you can use the isosurface function.
Then you have 2 options. Neither are trivial.
- Lloyd's algorithm. This takes a set of points and iteratively moves them so that they're more evenly spaced. Gabriel Peyré made a MATLAB tutorial (code here) on applying this to a mesh by using their Fast Marching Toolbox. The algorithm was more clearly described in their paper. See the GIF below, from one of Gabriel's tweets.
- Poisson disc sampling. This produces a tightly-packed set of random points with a minimum-distance between them. The naive approach is to repeatedly select random points on the surface and reject them if they're too close to any other points. Here are a few implementations applied to 3D meshes, although none in MATLAB: [1] [2] [3] [4] [5].
更多回答(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!