What is the height of a regular polygon?

I have three small circles forming a pyramid. I would like to centre that group in a square but have spent a couple of hours trying to calculate the height of the pyramid. I just can't seem to get them vertically centred.

Given a square, a large circle filling the square and then three smaller circles forming a pyramid, what is the height from the bottom of the smallest circle to the top of the smallest circle. https://googledrive.com/host/0BwFQiTKfux0qY1Y2d1hRdndtSEk/so_question.svg Calc radius of each circle of n circles in a circle: www.had2know.com/academics/inner-circular-ring-radii-formulas-calculator.html apothem: www.mathopenref.com/apothem.html Python code I tried to get working python code

If $r$ is the radius o fth eblue circles, the the width of the blue figure is $4r$ and the height is $\left(2+\sqrt 3\right)r$. The height of a regular triangle play a role here. By the way, if you rotate the blue pyramid by $30^\circ$, you can grow them still a bit bigger.

• The width is 4r. The triangle from the top of the highest blue circle to the widest part is a 30,60,90 degree with sides of 1, sqrt(3), 2. But the bottom two blue circles go below the widest point so the height is larger than the simple triangle. – Lawrence Jul 14 '13 at 18:08
• @user2517533, think about the triangle formed by the centres of the small circles. That gives you $\sqrt 3 r$. Then extending up and down from the appropriate centres gives an additional $2r$. – Peter Taylor Jul 14 '13 at 18:44
• Thanks this works. Peter's comment helped me visualize the solution. – Lawrence Jul 14 '13 at 19:49