It is possible that this is a duplicate, but I cannot find anything. I have always been wondering how to calculate pi. However, just using a given formula like the infinite series formulas does not seem to gain so clarity. Using a integral like
$$ \int^1_{-1} \sqrt{1-x^2}\,\text{d}x $$
Does of course make sense but applying this for some numeric calculation finding many decimals in pi seems hard.
This is why I wonder, what is the principles behind calculating pi? Are there any basic principles that may be followed to find an algorithm for this? The best answer would make it possible to create an algorithm for calculation of pi from fundamental properties, but any answer that takes me closer to this would be appreciated.
EDIT:
I could also do a taylor approximation I guess and in that way get a better precision, but I still wonder if there are any basic principle to follow to create a pi calculation algorithm.