Subject: CGAL users discussion list
List archive
Re: [cgal-discuss] Intersection between plane and triangle through the same three points
Chronological Thread
- From: Michael Hoffmann <>
- To: <>
- Subject: Re: [cgal-discuss] Intersection between plane and triangle through the same three points
- Date: Tue, 18 May 2021 11:20:43 +0200
- Authentication-results: mail2-smtp-roc.national.inria.fr; spf=None ; spf=Pass ; spf=None
- Ironport-hdrordr: A9a23:Idynj62JhzM9h6yBOZ1FoAqjBLUkLtp133Aq2lEZdPWaSKClfqGV7ZYmPHDP4wr5NEtLpTnEAse9qBDnhP1ICOsqUotKNTOO0FdAbrsC0WKI+V3d8ljFh4hgPNBbAs9D4bPLYGSS9fyKhDVQROxQpeW6zA==
- Ironport-phdr: A9a23:9MFehhMy7qWbXN5uBFkl6nZGChdPi9zP1u491JMrhvp0f7i5+Ny6ZQqDvKQr1gGXFtiEo9t/yMPu+5j6XmIB5ZvT+FsjS7drEyE/tMMNggY7C9SEA0CoZNTjbig9AdgQHAQ9pyLzPkdaAtvxaEPPqXOu8zESBg//NQ1oLejpB4Lelcu62/229pHJfQlFhTuwbbxyIRi0sA7cqtQYjYx+J6gr1xDHuGFIe+NYxWNpIVKcgRPx7dqu8ZBg7ipdpesv+9ZPXqvmcas4S6dYDCk9PGAu+MLrrxjDQhCR6XYaT24bjwBHAwnB7BH9Q5fxri73vfdz1SWGIcH7S60/VDK/5KlpVRDokj8KOT4l/2/YhcN+kaxVoBy/qRN9wIDaZ4CVOeFifqPEeNMWWWpBUtpTWiFHH4iyb5EPD+0EPetAqIf9pkcBrRukCgayAOPk1z1Ghnj43a001uQuCwfG3Ao9FN8JsHTUq9v1NKkXUe+vyqnIyy7Ob/JQ2Tfz8oTHbAwhofGNXL5qbcXRyVAiGgXYhVqftYLrJSma1vgRs2eF9epgU/qihm4kpg9/rTWhxtsghpXGi48UxF7K+jt0zZsrKdGmSkN1bt+pHYZRui2HNIZ7RsMvT31ntis7xbMLpZ61cDQIxZkh2hXRZfuHc42S7RLiUuacOTZ4hHR/eLK+nRm+60agyvf6W8Kp01hKtjJInsTSun0JzRDf98aKRuVn8ku83TuC1Brf5vxALE07jabXNYMtzqAqmpYNrUjOEDX6lUrrgKOMa0kp9eql5uL6abv8vJCcLZV7igTmP6QuhMO/BeM4PxALX2eB+OS80LLj8VPkTLlWlPE5jLXZsJDbJMgBuqG5AxdZ0ocl6xmhEzeryMkUkWcDIV5fZR6KgZblN0vTLP38DvqzmUmgnTNkyvzeO73uGJTNLnzNkLf7erZ97lZRyAo0zdBR6ZJUD6sOIPT1WkLqtdzYCBE5PxaqzOb7CNV815kSVn6PAqOBKqPdrUeI5v4zI+mLfIIapDn9JOIh5/L3kHA5mEQdcrW03ZsMc3C1Be9mIkWcYXr0mNgNC2YKvgwkTOzrklKOSzBTZ2zhF586/SwxXYK6EZ/YFMfqm62ExC79H5tMZ2kABErLCmbtb4zDWvECb2WZLcZl1zAFTrO8UJRy6Be1qQXGxqp7e+rI5jUD59Wkz8lw/+SVlBco9DUyAd7ayHCIV2gzn2UGQHg906l75EB80VyeyrMrv/sNQddc7vcMXgYhPoPH1MR7DcrzU0TPZIHaZkyhR4CDADoxR981i/8JbUh4EtOkxkTD2CSkBrYTkZSKApJy/77czT76J5AumD79yKA9ggx+EYN0Pmq8i/snn+AyL4vAkkGWzf/yM6kA3DyL/2fRlQJmWWlZVgA2XLnFTzYUZhmOxTwWzkLEQfmjFbQ1dABBm5fqFw==
Hi Marc,
the coordinates of your points look nice in decimal, but they (e.g., 1.1,
0.3, 0.7) get pretty ugly once converted to binary…
Best, Michael
> On 18 May 2021, at 11:16, Marc Alexa <> wrote:
>
> Hi Andreas,
>
> Thanks for the quick answer.
>
> I think I just now fully understood the consequences of “inexact
> constructions”. It does lead to some interesting results, I have to say. I
> put a minimal program together that generates such a result, which is of
> course unsurprising in general, but still a bit surprising to me for the
> ‘exact predicates’ statement.
>
> Best,
> Marc
>
> #include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
> #include <CGAL/intersections.h>
>
> typedef CGAL::Exact_predicates_inexact_constructions_kernel K;
> typedef K::Point_3 Point;
> typedef K::Line_3 Line;
> typedef K::Plane_3 Plane;
> typedef K::Triangle_3 Triangle;
>
> int main()
> {
> Point V0(1.0,0.3,0.7);
> Point V1(0.3,1.1,0.2);
> Point V2(3.3,4.7,5.1);
>
> Plane p(V0,V1,V2);
>
> std::cerr << "V0 on plane? " << p.has_on(V0) << std::endl;
> std::cerr << "V1 on plane? " << p.has_on(V1) << std::endl;
> std::cerr << "V2 on plane? " << p.has_on(V2) << std::endl;
>
> Triangle t(V0,V1,V2);
>
> std::cerr << "Triangle intersects plane? " << CGAL::do_intersect(p,t)
> << std::endl;
>
> Line l(V0,V1);
> std::cerr << "V0 on line? " << l.has_on(V0) << std::endl;
> std::cerr << "V1 on line? " << l.has_on(V1) << std::endl;
>
> std::cerr << "Triangle intersects line? " << CGAL::do_intersect(l,t) <<
> std::endl;
>
> std::cerr << "Plane intersects line? " << CGAL::do_intersect(l,p) <<
> std::endl;
>
> return 0;
> }
>
>
>
>> On 17. May 2021, at 20:53, Andreas Fabri
>> <> wrote:
>>
>> Hi Marc,
>>
>> As the plane is internally a point and a normal this is a construction.
>> So if the point is slightly off the plane of the triangle and the normal
>> happens to be correct the plane and the triangle plane are parallel.
>>
>> Even if one takes a vertex of the triangle as base for the plane
>> there is no guarantee that the intersection is the full triangle.
>>
>> andreas
>>
>> On 5/17/21 7:07 PM, Marc Alexa ( via cgal-discuss
>> Mailing List) wrote:
>>> Dear all,
>>>
>>> I’m a checking the intersection between Triangle_3 and Plane_3 objects.
>>> If both are constructed from the same triple of points, the result is
>>> false for most triples, but sometimes true. I’m using the exact
>>> predicates / inexact constructions kernel. Is this the expected / desired
>>> behavior? I had hope because of the exact predicates that the result for
>>> such intersection tests is at least consistent (and actually consistently
>>> true).
>>>
>>> Thanks!
>>> -Marc
>>>
>>>
>>>
>>
>> --
>> You are currently subscribed to cgal-discuss.
>> To unsubscribe or access the archives, go to
>> https://sympa.inria.fr/sympa/info/cgal-discuss
>>
>>
>
>
> --
> You are currently subscribed to cgal-discuss.
> To unsubscribe or access the archives, go to
> https://sympa.inria.fr/sympa/info/cgal-discuss
>
- [cgal-discuss] Intersection between plane and triangle through the same three points, Marc Alexa, 05/17/2021
- Re: [cgal-discuss] Intersection between plane and triangle through the same three points, Andreas Fabri, 05/17/2021
- Re: [cgal-discuss] Intersection between plane and triangle through the same three points, Marc Alexa, 05/18/2021
- Re: [cgal-discuss] Intersection between plane and triangle through the same three points, Michael Hoffmann, 05/18/2021
- Re: [cgal-discuss] Intersection between plane and triangle through the same three points, Marc Alexa, 05/18/2021
- Re: [cgal-discuss] Intersection between plane and triangle through the same three points, Marc Alexa, 05/18/2021
- Re: [cgal-discuss] Intersection between plane and triangle through the same three points, Andreas Fabri, 05/18/2021
- Re: [cgal-discuss] Intersection between plane and triangle through the same three points, Marc Alexa, 05/18/2021
- Re: [cgal-discuss] Intersection between plane and triangle through the same three points, Andreas Fabri, 05/18/2021
- Re: [cgal-discuss] Intersection between plane and triangle through the same three points, Marc Alexa, 05/18/2021
- Re: [cgal-discuss] Intersection between plane and triangle through the same three points, Marc Alexa, 05/18/2021
- Re: [cgal-discuss] Intersection between plane and triangle through the same three points, Marc Glisse, 05/18/2021
- Re: [cgal-discuss] Intersection between plane and triangle through the same three points, Michael Hoffmann, 05/18/2021
- Re: [cgal-discuss] Intersection between plane and triangle through the same three points, Marc Alexa, 05/18/2021
- Re: [cgal-discuss] Intersection between plane and triangle through the same three points, Andreas Fabri, 05/17/2021
Archive powered by MHonArc 2.6.19+.