在三角剖分表面上查找单元的CGAL

在三角剖分表面上查找单元的CGAL

本文介绍了使用Locate()在三角剖分表面上查找单元的CGAL的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用CGAL,我对单位球面上的一组随机点进行了3D Delaunay三角剖分,这是通过以下方式获得的:

Using CGAL, I have a 3D Delaunay Triangulation of a set of random points on the unit sphere, that I obtained via:

Delaunay T(points.begin( ),points.end());

Delaunay T(points.begin(), points.end());

现在,我想做的是查询T(使用locate()之类的东西)来查找表面面的三个顶点,其中包含任意点(也在单位球面上)。

Now, what I would like to be able to do is query T (using locate() or something like that) to find the three vertices of the surface facet that an arbitrary point (also on the unit sphere) is contained inside.

当我使用locate()时,有时会得到内部单元作为结果,其中包括无限顶点。我什么都不想要。我只想要表面刻面,并能够针对任意点执行此操作,我试图发现它也在单位球面上。试图弄清楚这个问题所花费的时间比我想象的要长得多。

When I use locate(), I get interior cells as results sometimes, which include the infinite vertex. I don't want any of these. I just want the surface facets and to be able to do this for any arbitrary point I try to find that is also on the unit sphere. Trying to figure this out has taken a lot longer than I thought it would.

任何帮助都将非常有必要。谢谢。

Any help would be much obliged. Thanks.

推荐答案

所以我将使用 find_conflit() CGAL :: Emptyset_iterator 表示cit,因为您不需要这些。
在bfit中,您将获得孔边界的小平面,并且该孔都是与您的点冲突的四面体(其外接球体包含该点,并且自然延伸到无限顶点)。
因此,对于bfit,使用 std :: back_inserter 将它们放入标准容器中。然后,遍历这些,测试它们是否是有限的方面。您得到的有限面是将您的点与三角剖分的其余部分分开的面,因此,您可以使用球体的中心进行 orientation()测试以获取您感兴趣的一个。

So I would use find_conflit(), with CGAL::Emptyset_iterator for cit because you don't need these.In bfit, you will get the facets of the boundary of the "hole", and the hole is all tetrahedra in conflict with your point (whose circumscribing sphere contains the point, with a natural extension to the infinite vertex).So, for bfit, put them in a standard container using std::back_inserter for example. Then, iterate over these, tests if they are finite facets. The finite facets you get are those that separate your point from the rest of the triangulation, so, you can then do orientation() tests with the center of the sphere to get the one you are interested in.

这篇关于使用Locate()在三角剖分表面上查找单元的CGAL的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-01 23:49