A = (-0.68, -2.24)
B = (5.58, -2.2600000000000002)
polígono1, lado1, lado2, lado3, C = Polygon(A, B, 3.0)
D = (2.12, 0.02)
recta1 = Line(A, B)
recta2 = Line(B, C)
recta3 = Line(C, A)
a = Segment(D, Intersect[recta1, OrthogonalLine[D, recta1]])
b = Segment(D, Intersect[recta2, OrthogonalLine[D, recta2]])
c = Segment(D, Intersect[recta3, OrthogonalLine[D, recta3]])
angAB = Angle(A, D, B)
angBC = Angle(B, D, C)
angCA = Angle(C, D, A)
test: sgn(180.0 * ° - {angAB, angBC, angCA})
suma: a * Element[test, 1.0] + b * Element[test, 2.0] + c * Element[test, 3.0]
sa = If(Element[test, 1.0] < 0.0, " - ", "")
sb = If(Element[test, 2.0] < 0.0, " - ", " + ")
sc = If(Element[test, 3.0] < 0.0, " - ", " + ")
texto1 = Text("Suma = " + sa + "a" + sb + "b" + sc + "c = " + sa + a + sb + b + sc + c + " = " + suma)