I've encountered a situation where I'm trying to replicate the corner to corner distance of a regular polygon. For instance, I know for a square, that the distance is roughly 1.414 times the inscribed diameter. For a hexagon, it is 1.155 times the inscribed diameter. Octagon, it is 1.082 times the inscribed diameter.
But if I want a general estimation or formula for determining what this value will be for any given regular polygon, what formula can be used? It is clearly known and used within the metallurgical industry, but I am only able to find tables of the resulting output, not what formula is used to determine these constants.
Is there a general formula?
I think I figured this out after going down a wrong path many times. Essentially, the task is to find the hypotenuse of the triangle formed by the triangle of opposite corners when the apothem is 0.5 (and thus the diameter of the inscribed circle is 1).
Then it simply becomes a calculation of: $H = \sqrt{1+(\tan({\pi \over n}))^2}$
This is because with a diameter of 1, we just have to find the side length, and use it as a term in the Pythagorean Theorem.