Sphere packing in AutoCAD: creating an Apollonian packing using F# – Part 3
As suggested in the last post, today we’re going to take the results of running the code from that post and use them to generate a hollowed-out sphere. A big thanks to Francesco Tonioni, from our Product Support team in Neuchatel, who spent some time throwing ideas around on a lazy (but very cold) Sunday afternoon, contributing significantly to this post.
A few minor changes to the code were needed: rather than creating the spheres at exactly the size at which they were generated by the F# code, I adjusted the C# code to multiply the radius by 0.98 and use that instead (simply to avoid spheres touching and therefore making it harder for the Autodesk Shape Manager component to effectively perform the Boolean subtract). I also adjusted the code to only make the inversion spheres transparent – not the outer sphere (which also got reduced in radius by 2%). I then manually scaled the outer sphere by 1.05 (which is probably more than was strictly needed, but anyway).
We used AutoCAD’s SUBTRACT command to subtract the results of the packing from the outer sphere. This took some time to complete, but we ended up with a partially hollowed sphere that could then be sectioned to expose its insides:
I don’t have access to a 3D printer (and frankly doubt that current technology would allow this to be printed, given the need for support material when building arches), but I did look a little into the mass properties of this – and the original sphere – using the MASSPROP command. The original sphere has a mass/volume of 4.5639, while our hollowed version has a mass/volume of 1.1752 (i.e. it’s about a quarter of the mass).
Not very surprising – and I’m sure this could be tweaked downwards with a deeper packing and perhaps a smaller percentage change in our spheres’ radii – but nonetheless interesting.
To take this further, I’ve been working on a different packing strategy that provides better overall strength, as well as considering non-spherical volumes. When initially looking into these directions, I was very grateful for pointers from Alex Fielder (who sent me a link to this interesting technique, which generates spheres that are optimally sized for filling an arbitrary volume rather than for strength) and Stephen Preston (who pointed me towards papers on randomly-tessellated foams structures and wasp-inspired construction algorithms, as well as getting me thinking about artificial life-inspired algorithms).
I’ve ended up thinking along different lines – which is actually more in line with the original hyperbolic tessellation approach – but we’ll see more in the next post.