I've done something similar a while ago, placing different sized spheres on a
plane. I used a blockmap which had a counter for each bin. This prevented me from
trying to add more objects than the array size would allow for, but could be used
to search for the most vacant bin reasonably easily. From memory, I dumped about
32000 spheres (radius 1-5 units) down without intersections in a few minutes. I
don't have the code handy but I could dig it out in a day or so.
MJL
Post a reply to this message
|