Ceva's theorem

You can animate “E” and “D”. Or manually move “A”, “B” or “C”

Ceva's theorem is a theorem about triangles in Euclidean plane 
geometry. Given a triangle ABC, let the lines AO, BO and CO
be drawn from the vertices to a common point O to meet 
opposite sides at D, E and F respectively.

A = (-2.08, -4.28)
B = (5.8, -4)
C = (1.22, 0.56)
poly1, c, a, b = Polygon(A, B, C)
D = Point(a)
E = Point(b)
d = Segment(E, B)
e = Segment(A, D)
O = Intersect(d, e)
f = Line(C, O)
F = Intersect(f, c)
g = Segment(C, F)
AF = Distance(A, F)
FB = Distance(F, B)
BD = Distance(B, D)
DC = Distance(D, C)
CE = Distance(C, E)
EA = Distance(E, A)
h: ((AF / FB * BD / DC) * CE / EA)
text2: "(AF/FB)*(BD/DC)*(CE/EA) = (" + AF + "/" + FB + ")*(" + BD + "/" + DC + ")*(" + CE + "/" + EA + ") = " + h + ""