Feynmani kolmnurga ülesande üldistus

Kui kolmnurga ABC küljed jagada p osaks ning seejärel ühendada kolmnurga 
tipud vastaskülje sellise punktiga, mis jaotab vastaskülje suhtes 1/(p-1), 
siis tekkiva GHI ja kolmnurga ABC pindalade suhe on 

\frac{S_{GHI}}{S_{ABC}}=\frac{\left(p-2 \right)^2}{p^2-p+1}.

n = 5 (slider from 1 to 5, step 1)
p = 5 (slider from 2 to 10, step 1)
A = (0.94, 2.32)
B = (-2.98, -4.92)
C = (6.04, -4.48)
t1, c, a, b = Polygon(A, B, C)
d = Circle(A, c / p)
e = Circle(B, a / p)
f = Circle(C, b / p)
D = Intersect(e, a, 1)
E = Intersect(f, b, 1)
F = Intersect(d, c, 1)
g = Segment(A, D)
h = Segment(B, E)
i = Segment(C, F)
G = Intersect(g, i)
H = Intersect(g, h)
I = Intersect(h, i)
t2, i_1, g_1, h_1 = Polygon(G, H, I)
lug: (p - 2)^(2)
nim: p^(2) - p + 1
lug1: lug / GCD[lug, nim]
nim1: nim / GCD[lug, nim]
tekst4: "\frac{S_{GHI}}{S_{ABC}}=\frac{\left(" + (LaTeX[p]) + "-2 \right)^2}{" + (LaTeX[p]) + "^2-" + (LaTeX[p]) + "+1}=
\frac{" + (LaTeX[lug1]) + "}{" + (LaTeX[nim1]) + "}."
väärtus: t2 / t1
tekst5: "\frac{S_{GHI}}{S_{ABC}}=\frac{" + (LaTeX[t2]) + "}{" + (LaTeX[t1]) + "}≈" + (LaTeX[väärtus]) + "≈\frac{" + (LaTeX[lug1]) + "}{" + (LaTeX[nim1]) + "}"