3D 网格到粒子云的转换
我需要将任意三角 3D 网格转换为均匀间隔的粒子云。 第一个想法是尝试找到一种方法来填充一个 3D 三角形。然后填充网格的每个三角形,删除边缘上的重复粒子,但这非常困难且工作量太大。我希望有更多数学方法。
谁能向我指出一种可以帮助我正确完成任务的算法......好吧,至少是近似的?
谢谢
I need to convert arbitrary triangulated 3D mesh to cloud of particles that are uniformly spaced.
First thought was to try find a way to fill one 3D triangle. And then fill each triangle of mesh, removing duplicated particles on edges, but that's just hard and too much work. I was hoping for some more-math way.
Can anyone point me to an algorithm which can help me do my task correctly... well, at least approximatively?
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
有两个主要选项:
网格体素化。很容易实现网格到体素的转换,但它不准确,因为无法实现均匀间距:立方体之间的距离可以是 x、x*sqrt(2) 或 x*sqrt(3),具体取决于相邻立方体是否在同一平面内且相邻.
表面泊松盘采样。很难实现,缺乏研究材料和代码,但在数学上非常正确。一些链接:
http://research.microsoft.com/apps/pubs/ default.aspx?id=135760
http://web.mysites。 ntu.edu.sg/cwfu/public/Shared%20Documents/dualtiling/index.html
There are two main options:
Voxelization of mesh. Easy to implement the conversion of mesh to voxels, but it's inaccurate since uniform spacing cannot be achieved: distance between cubes can be x, x*sqrt(2) or x*sqrt(3) depending if neighbor cubes are in same plane and adjacent.
Poisson disk sampling on surface. Hard to implement and lack of research material and code, but mathematically very correct. Some links:
http://research.microsoft.com/apps/pubs/default.aspx?id=135760
http://web.mysites.ntu.edu.sg/cwfu/public/Shared%20Documents/dualtiling/index.html
您可以使用 GIS 软件包或 R 等软件将 TIN 转换为栅格,然后检索代表该值的每个像素中心的一个点。 (ArcGIS 中的示例)
编辑:如果不规则 3D 网格每个 {x, y} 有多个高度,类似的方法是使用体素“网格”对网格进行采样,并为每个体素保留一个值。 GRASS GIS 具有功能来获取 TIN 的顶点(3d 网格) )并将它们转换为体素,然后返回到常规 3D 云。
You could convert the TIN to raster using a GIS package or software such as R, then retrieve one point at the center of each pixel representing the value. (Example in ArcGIS)
EDIT: If the irregular 3D mesh has multiple heights per {x, y} a similar approach would be to sample the mesh using a voxel "grid" and keep one value per voxel. GRASS GIS has the functionality to take the vertices of the TIN (3d mesh) and convert them to voxels, then back to a regular 3d cloud.