Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] Intersection between plane and triangle through the same three points

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 11:16:59 +0200
  • Authentication-results: mail2-smtp-roc.national.inria.fr; spf=None ; spf=Pass ; spf=None
  • Ironport-hdrordr: A9a23:W4cslqynNIvhZq0nxI2kKrPwEr1zdoMgy1knxilNoH1uA6mlfqWV9sjzuiWbtN9gYhwdcK+7SdG9qB/nlaKdmLNhRItKPzOW2ldATrsM0WKK+VSJcEHDH4VmtJuIHZIOa+EZszVB/KLHCLXUKadH/DE5nZrY4tvj8w==
  • Ironport-phdr: A9a23:cFVhTh9nRTyoYf9uWQ67ngc9DxPPW53KNwIYoqAql6hJOvz6uci7bQqFu6sm0QCBdL6YwsoMs/DRvaHkVD5Iyre6m1dGTqZxUQQYg94dhQ0qDZ3NI0T6KPn3c35yR5waBxdq8H6hLEdaBtv1aUHMrX2u9z4SHQj0ORZoKujvFYPeksC62/qs95DSYghEizqwbLFvJxiqsAvdsdUbj5F/Iagr0BvJpXVIe+VSxWx2IF+Yggjx6MSt8pN96ipco/0u+dJOXqX8ZKQ4UKdXDC86PGAv5c3krgfMQA2S7XYBSGoWkx5IAw/Y7BHmW5r6ryX3uvZh1CScIMb7S60/Vza/4KdxUBLmiDsIODEk/m/ZhMx+kqBUrhGmqRFk2YHYfISVOeB+fq/Bf94XQ3dKUMZLVyxGB4Oxd4wBAPAbPelEsoLwu18OogWxBAa2GejizTpIiWXs3aImyeguCwXG0xIvHt0Uq3nUo9D1O70TUeCx1qXH0TLDb/ZP1Dr79YPHfQwvr+uWUrJsbcre11MvFwXdg1iSqoHpITOY2OsMvmWf7OdtVeGihm4lpg9/vzShycgihpfViowVxF7J9Cp3zokoKdC7VEN2Y9qpHpVOuiyeKYZ7RN4pTW9vuCY/0LIGuJi7cTALyJQh3R7fauaIf5KG4hL5UuuaPDR2hGp9db6hmxq/9VKsx+78W8WuzlpGsilInsPDu30MzxDf98aKRudn8ku81juC0xrf5vxGLEwqj6bWL4Atz7gtnZQJq0vDBDX5mEDuga+WaEok/u+o5vziYrr8p5+cM5Z4hR/jPagzg8C/D+s1PwkUU2iU/uS807Lj/UnnT7lQkvI2lazZvIjbJcQduKG5HxdY3pg/5xu7FTur09QVkWMZIF5Zex+LlYfkNlDWLPD9F/i/glCskDlxx/DBO73sGpDNIWLZkLj9Z7py8UpcxxQ8zN9F/J9UBbQBL+jyWk/1rtDXEhg5Mwmsz+b9FNp9zp8eWX6IAqKBLKzSvkWH5uY2L+aRZY8VoyryK+U+5/71lnI5gl8cfayx3ZQNcny4H/JmI1+YYXX2mNsBH30K7UIDSvf3ggiCTSJLfCT1GLkt4ykyToOgF4bKAI63x6eQ2T+yWZxQaGcBAV+FFTLkdp6PRuwXOx+UOdJrsiABUe2hV5M5zkPp8xTrzqJuaOvS4CwR85z5k8Nk4vXa0hA0+zszBMuU1ySBTnp/g3gTFAIwx711nUFt1gKDzbRgmK4fUsdC4utAFAY8L5/VieJgTMvjXxrIOdaPRlHhSdqvBXQ9T8k63sQVMHp6Tt6thxSG0yuxCKIOjJSKAoY1++TSxSvfPcF4nlPPzqJppl0rUsIHYWivnKU5/gzeF4fhnECQlqLsfqMZin2evFyfxHaD6RkLGDV7Vr/ICCh3jq7+otHw50eERLirW+xP2uppzMeDLu5HZoSsgwkYAvjkP9vabiS6nGLiXX5gKZuDaYPrfyMW2yCPUSA5

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






Archive powered by MHonArc 2.6.19+.

Top of Page