Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] 3D-Point inside a 3D Polyhedron facet query

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] 3D-Point inside a 3D Polyhedron facet query


Chronological Thread 
  • From: Arun Ramasamy <>
  • To:
  • Subject: Re: [cgal-discuss] 3D-Point inside a 3D Polyhedron facet query
  • Date: Fri, 7 Jan 2011 06:24:52 -0800 (PST)
  • Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:X-YMail-OSG:Received:X-Mailer:References:Date:From:Subject:To:In-Reply-To:MIME-Version:Content-Type; b=eVRTgDsAgU1nh1dgf3mCgC3R5TC8krQ4werr0VRWjQneix3CQQy4eztbc34HRhMnLlEWRVXT+aPkz/rZ1axefk3H87Fe1lw+JsX9cNZPYgnl3hNqwUWZj6Fs51C3BjDJYUBguV7UW4fa8MY4clvsEnHslMSZMIFnqiAnw5ybjpU=;

Thanks Sebastien. I think there may be some inaccuracies w.r.to the the points being exactly on the plane. I'll try the 2d-projection method for now.
thanks arun


From: Sebastien Loriot (GeometryFactory) <>
To:
Sent: Thu, January 6, 2011 11:37:50 AM
Subject: Re: [cgal-discuss] 3D-Point inside a 3D Polyhedron facet query

Arun Ramasamy wrote:
> HI,
> I've to determine if a given 3D point is inside a 3D facet of a polyhedron. The facet is guaranteed to be a convex polygon and point is guaranteed to be in the same plane as the facet. Currently I'm planning to either
> 1. rotate everything to the X-Y plane and do a 2D evaluation using sign of angles and such or
> 2. Remove the least varying component from the facet and point coordinates (say Z) and do a 2D evaluation.
>
> Is there any better way to do this, where I don't have to reduce this to a 2D operation. Is that query supported in CGAL ?
>
> Please let me know if anything is not clear.
> thanks arun
>
>
You can use function coplanar_orientation with consecutive segments of
the facet:

http://www.cgal.org/Manual/latest/doc_html/cgal_manual/Kernel_23_ref/Function_coplanar_orientation.html#Index_anchor_428

Note that the point has to be in the plane (not almost in the plane).
If your point is not exactly in the plane, using a projection along x,y
or z axis should be a better solution (check the normal vector of the
plane to choose which one).

FYI, in the next release, they will probably be something called
Projection_traits that allows to use to 2D algorithms on 3D points
by considering them as 2D points projected onto a plane (xy, yx or
zx). With this traits used together with Polygon_2::bounded_side
(http://www.cgal.org/Manual/latest/doc_html/cgal_manual/Polygon_ref/Class_Polygon_2.html)
you could also have the answer.

S.

-- 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