Subject: CGAL users discussion list
List archive
- From: Bernd Gaertner <>
- To:
- Subject: Re: [cgal-discuss] Testing if point is contained in a convex hull
- Date: Fri, 25 May 2007 05:37:10 +0200
wrote:
I was wondering whether CGAL offers some mean to
test whether a (2D) points lies within a convex
hull or not.
The Polytope_distance_d package can compute the
distance between the convex hull of two point sets,
and if one point set is the vertex set of your convex
hull, and the other just the single 2D point, this will
solve your problem (containment = distance 0). Note that
you don't need the convex hull for that, just its
defining points.
Actually, using Polytope_distance_d is a bit of an overkill,
if you only want a yes/no answer. CGAL 3.3 (to appear within
a few days) contains a linear and quadratic programming solver,
and one of the example programs there solves exactly your
problem, using the linear programming solver.
Best regards,
Bernd Gärtner.
- Testing if point is contained in a convex hull, trieglaf, 05/24/2007
- Re: [cgal-discuss] Testing if point is contained in a convex hull, Bernd Gaertner, 05/25/2007
Archive powered by MHonArc 2.6.16.