def test_non_intersection2(self): """ckeck intersection de deux segments non sécants apprtenant à deux droites séquentes""" A = (0., 0.) B = (0., 1.) C = (-1., 2.) D = (1., 2.) K = intersection((A, B), (C, D)) assert(K is not None) assert(not sur_segment(K, (A, B)) or not sur_segment(K, (C, D)))
def test_convexe(self): """ test si un quadrilatere convexe est reconnu """ A = (1., 3.) B = (2., 4.) C = (5., 0.) D = (0., 1.) diag1 = (A, C) diag2 = (B, D) K = intersection(diag1, diag2) assert(K is not None) assert(sur_segment(K, diag1)) assert(sur_segment(K, diag2)) assert(convexe(A, B, C, D))