Eratosthenes Panels
John McCoy - 28/01/2014
Choose a Number and a Panel Width
Drag B until $ \overline{GF} = 1$
$\overline{CW}$ and $\overline{ED}$ will be two means between 1 and Number 
For 4th root Drag B until $\overline{NP}=1$

4th Root

Number = 2 (slider from 2 to 5, step 1)
PanelWidth = 1 (slider from 0.5 to 2, step 0.1)
A: (0, Number)
W: (PanelWidth, 0)
a = Segment(A, W)
B = Point(xAxis)
b = Ray(A, B)
c = Line(A, xAxis)
d = Line(W, yAxis)
C = Intersect(d, b)
e = Line(C, a)
D = Intersect(e, xAxis)
f = Line(D, d)
E = Intersect(f, b)
g = Line(E, e)
F = Intersect(g, xAxis)
h = Line(F, f)
G = Intersect(h, b)
distanceGF = Distance(G, F)
distanceED = Distance(E, D)
TextED: "\overline{" + (Name[E]) + (Name[D]) + "} \, = \, " + distanceED
distanceCW = Distance(C, W)
TextCW: "\overline{" + (Name[C]) + (Name[W]) + "} \, = \, " + distanceCW
i = Distance(g, c)
H = Intersect(c, e)
I = Intersect(c, g)
j = Line(H, yAxis)
k = Line(I, yAxis)
J = Intersect(k, xAxis)
poly1, j_1, f_1, i_1 = Polygon(F, I, J)
K = Intersect(j, xAxis)
poly2, h_1, k_1, d_1 = Polygon(K, D, H)
O = Intersect(xAxis, yAxis)
poly3, a_1, l, w = Polygon(O, W, A)
m = Segment(A, O)
n = Segment(C, W)
p = Segment(E, D)
q = Segment(G, F)
r = Segment(A, B)
distanceOA = Distance(O, A)
TextOA: "\overline{" + (Name[O]) + "" + (Name[A]) + "} \, = \, " + (LaTeX[distanceOA]) + ""
s = Line(G, j_1)
L = Intersect(c, s)
t = Line(L, yAxis)
M = Intersect(xAxis, t)
N = Intersect(s, xAxis)
poly4, m_1, n_1, l_1 = Polygon(N, L, M)
b_1 = OrthogonalLine(N, xAxis)
P = Intersect(b_1, r)
c_1 = Line(P, s)
distanceNP = Distance(N, P)
TextNP: "\overline{" + (Name[N]) + (Name[P]) + "} \, = \, " + distanceNP
e_1 = Segment(N, P)
Q = Intersect(c, c_1)
R = Intersect(c_1, xAxis)
g_1 = Segment(Q, R)
o = false
p_1 = OrthogonalLine(Q, xAxis)
S = Intersect(xAxis, p_1)
poly5, r_1, q_1, s_1 = Polygon(Q, S, R)
distanceFG = Distance(F, G)
TextFG: "\overline{" + (Name[F]) + "" + (Name[G]) + "} \, = \, " + (LaTeX[distanceFG]) + ""