This is an academic question, really, because I wrote some code to figure it out using a sort-of genetic algorithm. But it seems like there should be an easier way to figure this out with straight math. I know there are some math geeks on this forum, so I thought I'd post the question. (It came up as I was designing a hole test pattern for metric drill bit sizes to be produced by a 3D printer.)
Suppose you have 100 marbles, with sizes ranging from 100mm diameter all the way down to 1mm, and you wanted to organize them into the smallest area flat surface as possible, arranged roughly in rows of 10 in order of size -- so 1-10 in the first row, 11-21 in the second, etc. [edit: The smallest area of a plane on which all the spheres are centered, not tangent. Thanks, Sid!)
Is there an easier way (without doing what I ended up doing) to calculate the ideal positions?
As an example, here's what I came up with in code for a 7x12 arrangement (12 because the drill bits include 1/4 measurement in addition to 1/10: 3.0, 3.1, 3.2, 3.25, 3.3, 3.4, 3.5, 3.6, 3.7, 3.75, 3.8, 3.9 -- but that's really beside the point.) I also added in some padding between the circles in this example.
Suppose you have 100 marbles, with sizes ranging from 100mm diameter all the way down to 1mm, and you wanted to organize them into the smallest area flat surface as possible, arranged roughly in rows of 10 in order of size -- so 1-10 in the first row, 11-21 in the second, etc. [edit: The smallest area of a plane on which all the spheres are centered, not tangent. Thanks, Sid!)
Is there an easier way (without doing what I ended up doing) to calculate the ideal positions?
As an example, here's what I came up with in code for a 7x12 arrangement (12 because the drill bits include 1/4 measurement in addition to 1/10: 3.0, 3.1, 3.2, 3.25, 3.3, 3.4, 3.5, 3.6, 3.7, 3.75, 3.8, 3.9 -- but that's really beside the point.) I also added in some padding between the circles in this example.


Geez... Do you guys want to make my head explode??
Comment