I have a task where I need to approximately calculate Pi. Here is my strategy: I use the unit circle, the bisector of the angle of the iso-target triangle, and the definition of sin. I drew a diagram:

For example, if I want to use a hexagon (6 points / 6 sides), I just need to calculate a: ( 0.5*sin(2*pi/2*x) and multiply it by ( 2*x). Finally, since Pi = Circumference/Diameter, then my approximation is Pi = polygonal perimeter (since Diameter = 1).
Essentially:
from math import sin, pi
def computePi(x):
p = x*sin(pi/x)
print(p)
computePi(10000)
3.141592601912665
It works, and I think it is effective, as it is, no? Thank you for your time!
EDIT: to avoid roundness, I edited it using the Archimedes algorithm using only the Pythagorean tetra:

the code:
from math import sqrt
def approxPi(x):
s = 1
a = None; b = None;
for i in range(x):
a = sqrt(1 - (s/2)**2)
b = 1 - a
print('The approximate value of Pi using a {:5g}-sided polygon is {:1.8f}'.format(6*2**(i),(s*6*2**(i))/2))
s = sqrt(b**2 + (s/2)**2)