Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] Minimum distance of a Point_3 from a Polyhedron

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] Minimum distance of a Point_3 from a Polyhedron


Chronological Thread 
  • From: "Atul Thakur" <>
  • To:
  • Subject: Re: [cgal-discuss] Minimum distance of a Point_3 from a Polyhedron
  • Date: Mon, 20 Oct 2008 16:05:01 -0400
  • Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:mime-version :content-type:references; b=inY3Jp4pPLj/m9qFrshOvoXAx5gdTOLbEdRSwGMptHVkab3L/tZmwMdw0FgSOy09zJ BU7zBd7TGhl6TpIBscCKCW24qaDj3Jun33EQQpAy89AVqa6vmQ8QiuIZY3o7i0SuH2V1 2y8Z0SeaoVdkdcaaqc/KjgjG2JhjwvbpZnmQ8=

I generated the Polyhedron by creating convex hull of my geometry as follows.
CGAL::Object ch_obj;
Polyhedron_3 conv_hull;
CGAL::convex_hull_3(vertpset.begin(), vertpset.end(), ch_obj);
CGAL::assign (conv_hull, ch_obj);

Honestly speaking, I am not sure of primitives the facets are made up of. Based on my understanding, they are not triangles. They are general convex polygons.

The number of faces in my geometry is of the order of several hundred thousands.

The queries are of the order of several thousands.

I hope, the information is sufficient.

thanks,
-Atul


 



On Mon, Oct 20, 2008 at 3:29 PM, Pierre Alliez <> wrote:
please provide us with more details:
- is your polyhedron triangular?
- what is its complexity in #triangles?
- how many queries do you want to compute?



Atul Thakur a écrit :
Hi Pierre:

Essentially, I want to know if P lies on surface of polyhedron. If P is within or out pf polyhedron then P doesn't lie on surface of polyhedron.
P can lie inside or outside but within a given tolerance.
So, it should look something like,


bool on_surface(Polyhedron_3 polyhedron, Point_3 P)
{
  IF <fabs (distance_between(polyhedron, P))<1e-5>   THEN
      return TRUE
  else
      return FALSE;
}

thanks,
-Atul

On Mon, Oct 20, 2008 at 2:59 PM, Pierre Alliez < <mailto:>> wrote:

   hi Atul,

   I think the feature is not yet in CGAL - but I could provide you
   with hints about how to solve this.

   first let's try reformulating your problem:

   given a polyhedron (let's assume non self-intersecting and watertight)
   and a query point P, you want to know
   - if P lies inside or outside the polyhedron.
   - the closest distance form P to the polyhedron.

   is this right?

   Pierre
   http://www-sop.inria.fr/members/Pierre.Alliez/


   Atul Thakur a écrit :

       Hi all:

       I have a Polyhedron_3 and Point_3 and need to find out if the
       point lies "on the" polyhedron or not <the answer should be true
       if the point lies on the surface or very near to it, should be
       false if it lies deep within or totally outside of polyhedron>.
       I think one way of doing this is to determine the distance of
       the point from each facet plane along its normal of the
       Polyhedron and then seeing if any of the distance is less than a
       minimum bound value (say 1e-5). Is this the right way or there
       exists some neat elegant function to do this check <being a
       newbie, scanning 3500 pages of manual looks daunting :)>? I saw
       some functions Polytope distance* but haven't quite
       understood(may be unrelated).

       Any pointers would be really helpful.

       sincerely,
       -Atul



   --    You are currently subscribed to cgal-discuss.
   To unsubscribe or access the archives, go to
   https://lists-sop.inria.fr/wws/info/cgal-discuss




--
Pierre Alliez
INRIA Sophia Antipolis - Mediterranee
Project-team GEOMETRICA Tel: +33 4 92 38 76 77
Fax: +33 4 97 15 53 95

--
You are currently subscribed to cgal-discuss.
To unsubscribe or access the archives, go to
https://lists-sop.inria.fr/wws/info/cgal-discuss





Archive powered by MHonArc 2.6.16.

Top of Page