A = (-5, 4)
B = (-6, 7)
C = (-4, 6)
D = (-5, 6)
poly1, a, b, c, d = Polygon(A, B, C, D)
e = Segment(A, C)
f = Segment(D, B)
E = Intersect(e, f)
det_1: (x(A) - x(B)) * (y(D) - y(B)) - (y(A) - y(B)) * (x(D) - x(B))
det_2: (x(C) - x(B)) * (y(D) - y(B)) - (y(C) - y(B)) * (x(D) - x(B))
det_3: (x(A) - x(C)) * (y(B) - y(C)) - (y(A) - y(C)) * (x(B) - x(C))
det_4: (x(A) - x(C)) * (y(D) - y(C)) - (y(A) - y(C)) * (x(D) - x(C))
total: If[det_1 * det_2 < 0, 1, 0] + If[det_3 * det_4 < 0, 1, 0]
texte1 = If(total ≟ 0, Text["quadrilatère croisé", (-4, 2)])
texte2 = If(total ≟ 1, Text["quadrilatère concave", (-4, 2)])
texte3 = If(total ≟ 2, Text["quadrilatère convexe", (-4, 2)])