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.
$$
\pi = 2\sqrt 2 \cdot \frac{2}{\sqrt{2+\sqrt2}} \cdot \frac{2}{\sqrt{2+\sqrt{2+\sqrt2}}} \cdots.
$$
Find the square root of 2, and call that A. Then find the square root of 2 plus A, and call that B. Then find the square root of 2 plus B, and call that C.  Then find the square root of 2 plus C,  and call that D. Then find the square root of 2 plus D,  and call that E. Then find the square root of 2 plus E,  and call that F. Then find the square root of 2 minus F, and call that G. Then multiply G by 2 to the 7th power, and call that $\pi.$