there is any relation between $\pi$, $\sqrt{2}$ or a generic polygon? I'm a programmer, I'm always looking for new formulas and new way of computing things, to satisfy my curiosity I would like to know if there are any formulas, or I should say equalities, that make use of both $\pi$ and $\sqrt{2}$ .
I would also like to know if it's possible to generalize this relatively to any n-sided polygon ( even a 3D figure ), $\sqrt{2}$ that usually appears in quadrilaterals only.
Of course I would like to know about any possible domain, but since we should start from something, I would say that the domain of polygons and polyhedron triggers my interest in the first place.

I had fun doing that back in the days; lots of paper and the smallest mistake would end in chaos. I felt I had discovered something in the end :)
(Note: bug in the code snippet: k=3 is skipped; the line "if k>3 then" should be "if k>2 then".)

I was $17$ years old when I took on that task, alone at home with a lot of scratch paper. I remember the wow effect when the pattern emerged. It was about expressing PI in function of the square root of $2$. Focus recommended!
In the last $35$ years, I mentioned it $3$ or $4$ times and it never raised much interest, probably because expressing an irrational number in function of another no more rational one does not make sense :).
In iteration $3$, the function starts to look like the precedent one; then it's obvious between $3$ and $5$ and it goes on, making it easy to program. It will get closer to PI before breaking due to the variable's limitations. Here a code snippet (too) quickly put together for demo purposes.



Original post: https://www.facebook.com/yazel.boudour/posts/353578401680948

