Pack Circles

This is an OpenSCAD module to be included in other projects. It generates circles, packed tightly into a larger circle. I built this to create a battery case in OpenSCAD, and hopefully it's useful to someone else.
Packing here is suboptimal for 8 or more circles, because my circles are equidistantly distributed, so optimisations based on non-symmetric distributions aren't made.
Ring spacing is done by the TLAR optical method, to a couple of decimal places...
Some circles in some arrangements probably overlap slightly, and some rings may not be quite as small as they might be.
Incidentally, this covers the range from 1 to 30 packed circles. I don't intend to build a 30- battery-pack. Instead, this will be useful in my delta calibration program for selecting equidistant points on the bed.