Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] how to Check is point inside convex hull 3d?

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] how to Check is point inside convex hull 3d?


Chronological Thread 
  • From: Andreas Fabri <>
  • To:
  • Subject: Re: [cgal-discuss] how to Check is point inside convex hull 3d?
  • Date: Tue, 08 Dec 2009 15:36:16 +0100


Hi Mahdavi,

In case you have many query points, you better construct a 3D Delaunay
triangulation
from the convex hull points and call the locate method for each query point.

andreas


Bernd Gaertner wrote:
mahdavi wrote:
hi all,
I want Check whether point is inside convex hull3d or out convexhull3d or
on convexhull3d? my code for obtain convexhull is:
Polyhedron_3 Poly;
CGAL::Object ch_object;
CGAL::convex_hull_3(Pointch.begin(), Pointch.end(),ch_object );
CGAL::assign(Poly, ch_object);
thanks,



You don't need the convex hull for that. The test can be done with just the points, using linear programming. The CGAL Linear and Quadratic Programming Solver manual has an example program doing exactly this, see http://www.cgal.org/Manual/last/doc_html/cgal_manual/QP_solver/Chapter_main.html#sec:QP-iterators.

Best,
Bernd.





Archive powered by MHonArc 2.6.16.

Top of Page