When trying to calculate $\pi$ by polygon approximation, I found myself stuck when trying to get the height of an odd regular convex polygon.
Given that $\pi$ is a circle's circumference over its diameter. A n-gon's number of sides divided by it's height would approximate $\pi$ as the number of sides goes to infinity.
Consider that the size of the n-gon's edge size is always one
$S \rightarrow \infty$ (as the sides increase)
$∆ \rightarrow O$ (the N-gon approaches a circle)
$S/h \rightarrow π+$ (therefore $S/h$ approaches $\pi$)
I noted a pattern on the first few polygons 3, 5, 7
For a 3-gon the height would be $\sin(60°)$ and $π ≈ 3.46 ≈ 3/\sin(60°)$
For a 5-gon the height would be $\sin(36°) + \cos(18°)$ so $π ≈ 3.24 ≈ 5/ (\sin(36°) + \cos(18°))$
For a 7-gon the height would be ≈ $(\cos(64°)+\cos(38°)+\cos(25°))$
And so on...
As the number of sides increase we would approach $\pi$ and the height would be given by a sum of trigonometric functions that contain numbers the sum to one interior angle of the same n-gon (note that all angles are equal)
eg:
2 sides - 60° h = sin(60)
3 sides - 54° h = sin(36) + cos(18)
Is there a more straight forward way to calculate the height of a n-gon that does not involve using $\pi$ in the function? Am I doing something wrong in my reasoning?
You can find the height by using one triangle obtained by connecting two adjacent vertices and the circumcenter. Let the side of the polygon be $x$. Then we have an isosceles triangle with base $x$ and vertex angle equal to $\frac{2\pi}{n}$. The height to the base $h_1=\frac{x}{2} \cot (\frac{\pi}{n})$. The legs of the triangle will be the radius of circumcircle $R=\frac{x}{2} \csc\frac{\pi}{n}$.
The height of the polygon $h=h_1+R=\frac{x}{2} \csc\frac{\pi}{n}(1+\cos \frac{\pi}{n}) $