I'd like to be able to find the diameter of any 2d or 3d polygonal, figurate number with 3,4,5, or more sides - based on the figurate number being comprised of circles that have a diameter of 1 inch each.

Id like to be able to describe this with a simple formula that I can
use for any shaped polygonal number, so for example I could apply
this to a square number or a cube number, a pentagonal number, etc...

I think the total circle area would play a part in this?

Any insights and or meaningful feedback, especially tips on how to
construct such a formula would be greatly appreciated!