Subject: CGAL users discussion list
List archive
- From: Pierre Alliez <>
- To:
- Subject: Re: [cgal-discuss] Minimum distance of a Point_3 from a Polyhedron
- Date: Mon, 20 Oct 2008 23:09:11 +0200
- Organization: INRIA
hmmm... if your polygon is convex then you can certainly take advantage of this. I think you should take a look at some collision detection software http://www.cs.unc.edu/~dm/
Atul Thakur a écrit :
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
<
<mailto:>>
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:>
<mailto:
<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
http://www-sop.inria.fr/members/Pierre.Alliez/
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
--
Pierre Alliez
INRIA Sophia Antipolis - Mediterranee
Project-team GEOMETRICA
http://www-sop.inria.fr/members/Pierre.Alliez/
Tel: +33 4 92 38 76 77
Fax: +33 4 97 15 53 95
- [cgal-discuss] Minimum distance of a Point_3 from a Polyhedron, Atul Thakur, 10/20/2008
- Re: [cgal-discuss] Minimum distance of a Point_3 from a Polyhedron, Pierre Alliez, 10/20/2008
- Re: [cgal-discuss] Minimum distance of a Point_3 from a Polyhedron, Atul Thakur, 10/20/2008
- Re: [cgal-discuss] Minimum distance of a Point_3 from a Polyhedron, Pierre Alliez, 10/20/2008
- Message not available
- Re: [cgal-discuss] Minimum distance of a Point_3 from a Polyhedron, Atul Thakur, 10/20/2008
- Re: [cgal-discuss] Minimum distance of a Point_3 from a Polyhedron, Pierre Alliez, 10/20/2008
- Re: [cgal-discuss] Minimum distance of a Point_3 from a Polyhedron, Bernd Gaertner, 10/21/2008
- Re: [cgal-discuss] Minimum distance of a Point_3 from a Polyhedron, Atul Thakur, 10/20/2008
- Message not available
- Re: [cgal-discuss] Minimum distance of a Point_3 from a Polyhedron, Pierre Alliez, 10/20/2008
- Re: [cgal-discuss] Minimum distance of a Point_3 from a Polyhedron, Atul Thakur, 10/20/2008
- Re: [cgal-discuss] Minimum distance of a Point_3 from a Polyhedron, Peter Hachenberger, 10/20/2008
- Message not available
- Re: [cgal-discuss] Minimum distance of a Point_3 from a Polyhedron, Atul Thakur, 10/20/2008
- Message not available
- Re: [cgal-discuss] Minimum distance of a Point_3 from a Polyhedron, Pierre Alliez, 10/20/2008
Archive powered by MHonArc 2.6.16.