3d 等值面与平面相交后对顶点进行排序
这是另一个几何问题:
我使用移动立方体算法创建了点云的 3 维三角等值面。然后,我将该等值面与一个平面相交,并得到许多代表相交轮廓线的线段。
是否有可能对这些线段的顶点进行顺时针排序,以便我可以将它们绘制为闭合路径并进行洪水填充?
提前致谢!
Here is another geometric problem:
I have created an 3-dimensional triangulated iso-surface of a point cloud using the marching cubes algorithm. Then I intersect this iso-surface with a plane and get a number of line segments that represent the contour lines of the intersection.
Is there any possibility to sort the vertices of these line segments clockwise so that I can draw them as a closed path and do a flood fill?
Thanks in advance!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这取决于等值面的复杂程度,但我能想到的最简单的可行方法是:
如果您的等值面/平面围绕质心的角度单调增加,那么这将工作得很好。如果没有,那么您可能需要找到平面上每个点的 2 个最近邻点,并希望这能形成一个简单的循环。从表面上看,简单循环的想法可能更简单,因为您不需要投影,也不需要计算角度 - 只需在 3d 中完成所有操作即可。
It depends on how complex your isosurface is, but the simplest thing I can think of that might work is:
If your isosurface/plane is monotonically increasing in angle around the centroid, then this will work fine. If not, then you might need to find the 2 nearest neighbors to each point in the plane, and hope that that makes a simple loop. In face, the simple loop idea might be simpler, because you don't need to project and you don't need to compute angles - just do everything in 3d.