def test_Intersection_droites():
    d1 = rand_dte()
    d2 = rand_dte()
    A = Intersection_droites(d1, d2)
    if not d1.parallele(d2):
        assert(A in d1 and A in d2)
    d3 = Parallele(d1, rand_pt())
    assert(not Intersection_droites(d1, d3).existe)
    D = Point(-14.201335283549275, 1.5093204196583834)
    U = Point(-14.201335283549273, 17.644024286752096)
    d = Droite(U, D)
    s = Segment(U, D)
    V = Point(1.933368583544437, 7.5065025053891166)
    W = Point(7.1347038670937115, 8.3895493390615954)
    d2 = Droite(W, V)
    M1 = Intersection_droites(s, d2)
    M2 = Intersection_droites(d, d2)
    assert(M1.existe)
    assert(M2.existe)
Example #2
0
def test_Intersection_droites():
    d1 = rand_dte()
    d2 = rand_dte()
    A = Intersection_droites(d1, d2)
    if not d1.parallele(d2):
        assert (A in d1 and A in d2)
    d3 = Parallele(d1, rand_pt())
    assert (not Intersection_droites(d1, d3).existe)
    D = Point(-14.201335283549275, 1.5093204196583834)
    U = Point(-14.201335283549273, 17.644024286752096)
    d = Droite(U, D)
    s = Segment(U, D)
    V = Point(1.933368583544437, 7.5065025053891166)
    W = Point(7.1347038670937115, 8.3895493390615954)
    d2 = Droite(W, V)
    M1 = Intersection_droites(s, d2)
    M2 = Intersection_droites(d, d2)
    assert (M1.existe)
    assert (M2.existe)
Example #3
0
def test_intersections_non_deplacables():
    d1 = rand_dte()
    d2 = rand_dte()
    A = Intersection_droites(d1, d2)
    assert(not A._modifiable)
    assert(not A._deplacable)