Soroban's cosine is the easiest way to go about this sort of thing. But suppose you couldn't use trig. Archimedes didn't have trig as we know it, but he managed to estimate pi very closely by inscribing polygons in a circle. Starting with a square, then a octagon, then a 16-gon, 32-gon, etc.
My looking that the diagram we can see:
a)\(\displaystyle \L\\(\frac{79}{5}-x)^{2}+(\frac{s}{2})^{2}=(\frac{79}{5})^{2}\)
b) \(\displaystyle \L\\x^{2}+(\frac{s}{2})^{2}=t^{2}\)
Squaring the binomial in a, we have:
\(\displaystyle \L\\x^{2}-\frac{158}{5}x+\frac{s^{2}}{4}=0\)....[c]
Using b in c and solving for x:
\(\displaystyle \L\\x=\frac{5t^{2}}{158}\)....[d]
Now, using a:
\(\displaystyle \L\\(\frac{79}{5}-x)^{2}=(\frac{79}{5})^{2}-(\frac{s}{2})^{2}\)
Square both sides:
\(\displaystyle \L\\\frac{79}{5}-x=\frac{\sqrt{24964-25s^{2}}}{10}\)
Sub in [d]:
\(\displaystyle \L\\\frac{79}{5}-\frac{\sqrt{24964-25s^{2}}}{10}=\frac{5t^{2}}{158}\)
Solve for t:
\(\displaystyle \L\\t=\frac{\sqrt{79}\sqrt{158-\sqrt{24964-25s^{2}}}}{5}\)
Now, though it appears to be a monster, we can use this to find the perimeter of any subsequent n-gons, given the preceeding n-gon.
Starting with the square, which we know already has side length \(\displaystyle \frac{79\sqrt{2}}{5}\). Call it \(\displaystyle s_{1}\)
Subbing that into the formula above, we find the the side length of the octagon is \(\displaystyle \L\\\frac{79\sqrt{2-\sqrt{2}}}{5}\approx{12.09}\)
Multiply by 8 and we see the perimeter is \(\displaystyle \H\\\frac{632\sqrt{2-\sqrt{2}}}{5}\approx{96.74}\).
Which agrees with the cosine method.
You know the circumference of the circle is \(\displaystyle 2{\pi}(\frac{79}{5})=\frac{158{\pi}}{5}\approx{99.27}\)
The octagon perimeter must be smaller than that. As you increase the number of sides on the n-gon, the perimeter of the n-gon approaches the circumference of the circle. That's intuitive. That's how Archimedes estimated pi.