Subject: CGAL users discussion list
List archive
Re: [cgal-discuss] Intersection between plane and triangle through the same three points
Chronological Thread
- From: Marc Alexa <>
- To:
- Subject: Re: [cgal-discuss] Intersection between plane and triangle through the same three points
- Date: Tue, 18 May 2021 12:06:45 +0200
- Authentication-results: mail2-smtp-roc.national.inria.fr; spf=None ; spf=Pass ; spf=None
- Ironport-hdrordr: A9a23:pfLdDa3nrncGCcQ9OK/GuwqjBGskLtp133Aq2lEZdPU1SL3kqynKpp8mPHDP6Qr5J0tQ/+xoVJPtfZqez+8N3WBpB8bYYOC+ghrTEGgA1/qf/9SDIU3DH4dmvM8LT0EZMrLN5DNB4PoSjjPXLz5cqOP3iJxAUd2urUuEMWlRGsZdBn9Ce2Wm+7pNNW177DMCZf+h2vY=
- Ironport-phdr: A9a23:au+WchF7pOJ5bJ22ZaNx151Gf1ZLhN3EVzX9CrIZgr5DOp6u447ldBSGo6k03RmTA9uQtq0MotGVmpioYXYH75eFvSJKW713fDhBt/8rmRc9CtWOE0zxIa2iRSU7GMNfSA0tpCnjYgBaF8nkelLdvGC54yIMFRXjLwp1Ifn+FpLPg8it2O2+5pnebx9WiDe8YL5+IxW7oAfMvcQKnIVuLbo8xAHUqXVSYeRWwm1oJVOXnxni48q74YBu/SdNtf8/7sBMSar1cbg2QrxeFzQmLns65Nb3uhnZTAuA/WUTX2MLmRdVGQfF7RX6XpDssivms+d2xSeXMdHqQb0yRD+v6bpgRh31hycdLzM38H3YhMN/g6xGrhyhqQJxzIzXbo+SL/d+YrrdfdYGSWpBQspcVSpMCZ68YYsVCOoBOP5VoY7nqFsUsRS1GBWhBOfxxT5HnHD9wKo30+E7HgHcwAMsBcgBsHDKo9T6LqgfSu+1zKzSwjXCa/Nawyvy6I/Nch04p/yHQL1/f9bLx0Y1CwPFkkufqZbjPz6N1ekDs2eW4eRuW+6xi2Mpqx98riSuy8osiYTFmoEYx1TK+CllwYs5OMG0RVN1bNCkEpZcqy+UOpZ4T84/Q2xlpCA3waAIt568eSgF0pUnxxjHZvyGdYiI+BPjW/yLLTd2nnJofq+0iRWq8UW41OHwSs253ExJoydFiNXAqG0B2h/J5sWHRPZx5lqt1DiT2wzJ9+1JLkQ5mbDGJ5Mj3LI8jJ4evVrFEyTrgkv5lrWWeV8h+uWw6+TofLHmppiEOo9xkA7+M6AultWhDuQ6LwQCRmab9OSy2bH58k35R7JKjvIykqbHqpzVOcMbpquhDw9U1IYs9Qq/Ai+43NgEmXQLNlFIdRKdg4T3Jl3DI+r0APexjli0lTdk3fHGPrnvApXXKXjDla/sfbNn5E5G1AU/18pQ55ZKBbAOOv3+QUDxtNnCAR84Nwy42froCNJ41o8GQ2KAHreZML/OsV+P/u8gP+aMa5URuDrkNvcl5uXugmMkmV8GZqmkxoAXaXC9HvR+OUqVe3vsgtEbEWcLpAUyVuLqiEfRGQNVfGu4CqIg+ikgWsXhFpbGXonrgbqb3S79EIcRfXFDElnLEHHmcMKPVP4ILS6TOcR8iSdXaL66VoUd2AGy4Q/m16J8fK2T4TwdrZul1d5v5uSVmwt17i1xF83a0meDSCZ/kWoMAjM3x6tiulcu9lDW2qdxh7lUFMdY+uhSegY8L5/VieJgWP7oXQeUW96TQx6PRti2CHllS9sryJkHZ0ttEv2tixnC22yhBLpDxO/DP4A97q+Jhyu5HM160XuTjMHJbnEjS8pLcGCk3+txqlOVCInOnEGU0a2tcPZEtMYo3GiGxGuK+kpfVVwoOU0qdX8ab0rS69/+4xGbJ4I=
Ah, this is good to know. Because this is exactly what I wanted to do: being
lazy, not keeping track of how I subdivide the triangle, but then identify
the elements of the subdivided triangle using the plane through the triangle.
So, I guess, I have to do the bookkeeping…
Best,
Marc
> On 18. May 2021, at 12:01, Andreas Fabri
> <> wrote:
>
> Hi Marc,
>
> Even with an Exact_predicates_exact_constructions_kernel you should pay
> attention
> not to construct something and later use it in a predicate where you could
> exploit
> combinatorial information.
>
> Say you construct the midpoint mp of a segment seg and later call
> seg.has_on(mp).
>
> As in the exact construction kernel the predicate is first computed with
> interval arithmetic
> the collinearity test has all chances to fail with interval arithmetic, and
> it will
> be done with arbitrary precision rational numbers.
>
> And such mistakes are sometimes still made even in CGAL, if you look at some
> recent pull requests concerning Boolean operations with Nef Polyhedra.
>
> Best,
>
> Andreas
>
> On 5/18/21 11:20 AM, Michael Hoffmann wrote:
>> 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
>>>
>>
>
> --
> 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+.