Subject: CGAL users discussion list
List archive
- From: Monique Teillaud <>
- To:
- Subject: Re: [cgal-discuss] Circle-Circle-intersection
- Date: Wed, 24 Apr 2013 14:17:04 +0200
Dear Sybren,
I agree that the sentence that you have included in your email may easily be misinterpreted. We should make it more specific.
Thank you for the email.
Best regards,
Monique Teillaud
Le 23/04/13 08:58, Sybren A. Stüvel a écrit :
Dear list,
As part of a (for this mailing list not that interesting) algorhtm, I
have to determine whether two circles intersect. I do this using
CGAL::do_intersect(...) as described on
http://www.cgal.org/Manual/latest/doc_html/cgal_manual/Kernel_23_ref/Function_do_intersect.html
Now I believe that there either is a bug in the implementation, or in
the documentation, as my interpretation of the latter does not
correspond to the behaviour of the former. The documentation states that:
/for objects like triangles and polygons that enclose a bounded region,
this region is part of the object./
This led me to believe that for circles, which also enclose a bounded
region, this would also apply. I therefore assumed that when one circle
is embedded in the other (i.e. their boundaries do not intersect),
CGAL::do_intersect(...) would return true. After all, the bounded
regions do intersect. However, CGAL behaves differently, and performs
the intersection test on the boundary alone. I have attached a test
program that shows this behaviour.
Tested on CGAL 4.1, Windows 8 64-bit, Visual Studio 2010.
I fully understand that a circle is not a disc, and that the behaviour
of CGAL::do_intersect is perfectly defendable. However, a change in the
documentation may be a good idea. It would have saved me a few days of
debugging my code.
Kind regards,
--
Sybren A. Stüvel
http://stuvel.eu/
--
Monique Teillaud
http://www.inria.fr/sophia/members/Monique.Teillaud/
INRIA Sophia Antipolis - Méditerranée
Institut National de Recherche en Informatique et Automatique
- [cgal-discuss] Circle-Circle-intersection, Sybren A . Stüvel, 04/23/2013
- Re: [cgal-discuss] Circle-Circle-intersection, Monique Teillaud, 04/24/2013
- Re: [cgal-discuss] Circle-Circle-intersection, Sybren A . Stüvel, 04/24/2013
- Re: [cgal-discuss] Circle-Circle-intersection, Monique Teillaud, 04/24/2013
Archive powered by MHonArc 2.6.18.