Circle Packing
all this time I've been trying to put as many circles into a space and I didn't know it had a name, circle packing.
I’ve used several methods for figuring out how many cylindrical cells will fit inside a tube. From grabbing a bunch of test cells and seeing how many you can fit into a tube, to using an excel spreadsheet with calculations for different arrangements and using a CAD program to do a paste array trial and error method.
Another method I can add to my arsenal is a method used circle packing maths from the following site: http://hydra.nat.uni-magdeburg.de/packing/cci/cci.html#Applications
Enter the inside diameter of the tube, then the diameter of the cells. Don't bother with name and email address and just click on Let's Go. Remember to add an extra mm to the diameter if you are 3D printing a holder.
The result page shows you the arrangement and also the X - Y coordinates.
And here is circle packing in a square, http://hydra.nat.uni-magdeburg.de/packing/csq/csq.html#Applications
Fitting circles in a rectangle is different again, http://hydra.nat.uni-magdeburg.de/packing/crc_var/crc.html which unfortunately does not have a calculator.