Subject: CGAL users discussion list
List archive
- From: "Sebastien Loriot (GeometryFactory)" <>
- To:
- Subject: Re: [cgal-discuss] Calculating position of point in space ?
- Date: Fri, 03 Feb 2012 12:41:07 +0100
Actually in my answer I was thinking of 3 spheres.
If you have 4 spheres in general the point is uniquely defined.
If you use the intersection of spheres, the distance need to be exact
(not floating point approximation).
If you have floating point distances, you can only get an approximation.
The procedure is the following: take three spheres and compute the
intersection circles for the two possible pairs of spheres. Then
intersect the circles to get two points. The point you are looking for
is the one closest to the fourth sphere (or exactly on it if distances
are exact).
Note that in that case, CGAL is probably not the most efficient
solution to do that.
Sebastien.
On 02/03/2012 11:40 AM, Sebastien Loriot (GeometryFactory) wrote:
You can compute the intersection of 4 spheres centered at your 4 points
with radius being the distance to the points you are looking for.
Note that in general you have two such points (in degenerate cases you
can have a sphere, a circle or a single point).
You'll need to use the Spherical_kernel_3.
Have a look at:
http://www.cgal.org/Manual/latest/doc_html/cgal_manual/Circular_kernel_3_ref/FunctionObjectConcept_SphericalKernel--Intersect_3.html#Cross_link_anchor_902
http://www.cgal.org/Manual/latest/doc_html/cgal_manual/Circular_kernel_3_ref/Class_Exact_spherical_kernel_3.html#Cross_link_anchor_863
Sebastien.
On 02/03/2012 08:54 AM, Adam wrote:
Hello All !!!
I’m new here and I lack knowledge so please bear with me.
I have a problem. I have to calculate position of point in space having
distance from 4 known points.
Is it possible to calculate this position in use of CGAL library?
If not, may be some knowledgeable users can point me in the right
direction.
Regards,
Adam
--
View this message in context:
http://cgal-discuss.949826.n4.nabble.com/Calculating-position-of-point-in-space-tp4353924p4353924.html
Sent from the cgal-discuss mailing list archive at Nabble.com.
- [cgal-discuss] Calculating position of point in space ?, Adam, 02/03/2012
- Re: [cgal-discuss] Calculating position of point in space ?, Sebastien Loriot (GeometryFactory), 02/03/2012
- Re: [cgal-discuss] Calculating position of point in space ?, Sebastien Loriot (GeometryFactory), 02/03/2012
- [cgal-discuss] Re: Calculating position of point in space ?, Adam, 02/03/2012
- Re: [cgal-discuss] Re: Calculating position of point in space ?, Sebastien Loriot (GeometryFactory), 02/03/2012
- [cgal-discuss] Re: Calculating position of point in space ?, Adam, 02/03/2012
- Re: [cgal-discuss] Calculating position of point in space ?, Sebastien Loriot (GeometryFactory), 02/03/2012
- Re: [cgal-discuss] Calculating position of point in space ?, Sebastien Loriot (GeometryFactory), 02/03/2012
Archive powered by MHonArc 2.6.16.