השלמת הטרפז למשולש

אלכסוני טרפז

A = (-3, -2)
B = (3, -2)
D = (-3, 1)
a_2 = Line(A, B)
b_1 = Line(D, a_2)
C = Point(b_1)
poly1, a_1, b, d, a = Polygon(A, D, C, B)
e = Segment(D, B)
f = Segment(C, A)
O = Intersect(f, e)
g = Line(O, a)
E = Intersect(g, a_1)
F = Intersect(g, d)
c = Segment(E, F)
text1: "AB= a =" + a + ""
text2: "DC= b = " + b + ""
text3: "EF = c = " + c + ""
r: 2 * a * b / (a + b)
text4: "EF=\frac{2ab}{a+b}=" + (LaTeX[FractionText[r]]) + "=" + (LaTeX[r]) + ""
h = Segment(E, O)
i = Segment(O, F)
text5: "EO=" + h + ""
text6: "OF=" + i + ""
j = Line(A, D)
k = Line(B, C)
G = Intersect(j, k)
poly2, b_2, a_3, g_1 = Polygon(A, G, B)
l = Line(G, O)
H = Intersect(l, a)
m = Segment(G, H)
n = false