Aproximação de π  (Arquimedes)

A = (0.8437729125745143, 1.3475555022601202)
c = Circle(A, 1)
a: y = y(A)
B = Point(c)
n = 1 (slider from 1 to 5, step 1)
lista1 = IterationList(2 * x, 6, 4)
m = Element(lista1, n)
B' = Rotate(B, 360 * ° / m, A)
α = Angle(B, A, B')
polígono1, b, b', d, e, f, g, C, D, E, F = Polygon(B, B', m)
p: m * b
h: p / 2
texto1: "$ \pi\approx" + (LaTeX[p]) + "/2=" + (LaTeX[h]) + " $"
G = Point(a)
k = Circle(G, 1)
i = Line(A, B)
j = Line(G, i)
H = Intersect(k, j, 2)
l = Tangent(H, k)
H' = Rotate(H, 360 * ° / m, G)
β = Angle(H, G, H')
q = Tangent(H', k)
I = Intersect(l, q)
r = Circle(H, I)
J = Intersect(r, l, 2)
polígono2, j_1, i_1, s, t, a_1, b_1, K, L, M, N = Polygon(J, I, m)
o: m * s
u: o / 2
texto2: "$ \pi\approx \displaystyle\frac{" + (LaTeX[o]) + "}{2}\approx " + (LaTeX[u]) + " $"
texto4: "Polígono regular 
curcunscrito com " + m + "  lados"
texto3: "Polígono regular 
inscrito com " + m + " lados"