如何测试,如果点位于其表面由点云定义的3D形状内? [英] How can I test if a point lies within a 3d shape with its surface defined by a point cloud?

查看:304
本文介绍了如何测试,如果点位于其表面由点云定义的3D形状内?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有描述的形状,即应大致球形的表面点的集合,并且我需要与一个方法,以确定是否有任何其它给定的点位于该形状内。我有previously已经逼近形状完全相同的球,但是这已经被证明过于不准确的,我需要一个更精确的方法。简单和速度,有利于在完全准确,一个好的近似就足够了。

I have a collection of points which describe the surface of a shape that should be roughly spherical, and I need a method with which to determine if any other given point lies within this shape. I've previously been approximating the shape as an exact sphere, but this has proven too inaccurate and I need a more accurate method. Simplicity and speed is favourable over complete accuracy, a good approximation will suffice.

我遇到的技术,用于将点云到三维网格,但我发现大部分事情已经非常复杂,我要找的东西越简单越好。

I've come across techniques for converting a point cloud to a 3d mesh, but most things I have found have been very complicated, and I am looking for something as simple as possible.

任何想法?

非常感谢, 本。

推荐答案

如果您有什么计算云的重心,并转换其坐标到极坐标系的原点是重心。

What if you computed the centroid of the cloud, and converted its coordinates to a polar system whose origin is that centroid.

然后,转换要检查到同一个坐标系中的位置。

Then, convert the point you want to examine to the same coordinate system.

假设表面重新presentable由德劳内三角测量,确定了3分,在角度你检查点的差异最小。

Assuming the surface is representable by a Delaunay triangulation, determine the three points with the smallest difference in angle from the point you're examining.

项目你检查到由这三个点所确定的三角形,并查看是否从质心投影点的距离比实际点的距离大的点。

Project the point you're examining onto the triangle determined by those three points, and see if the distance of the projected point from the centroid is larger than the distance of the actual point.

从本质上讲,你就构造了凸包的三角形网格,而是按需一个三角形的时间。如果执行速度真的很重要,你还不如你去缓存所产生的三角形。

Essentially, you're constructing a triangular mesh of the convex hull, but as-needed one triangle at a time. If execution speed really matters, you might cache the resulting triangles as you go.

史蒂芬Sudit还建议<一href="http://stackoverflow.com/questions/3054193/how-can-i-test-if-a-point-lies-within-a-3d-shape-with-its-surface-defined-by-a-po/3054427#3054427"标题=缩小问题的范围>一个非常有用的优化如果你走这条路,我建议你。

Steven Sudit has also suggested a useful optimization that I'd recommend if you go down this path.

这篇关于如何测试,如果点位于其表面由点云定义的3D形状内?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆