I'm working on visualizing a hierarchy. There will be clusters of objects, each cluster containing rectangles of fixed width but variable height. I'd like to arrange these within a rectangular space so as to have equal visual spacing between them, something like this:
Before I spend a day inventing the wheel, are there standard algorithms for this kind of distribution and space-filling? If the objects were all the same size, I'd just use a grid.
I'll be using this algorithm at two levels: once to lay out the clusters, and again to lay out the objects within each cluster. The latter would look best if they were arranged within a roughly circular space, but if that complicates things excessively I'm OK with rectangular.
I won't be showing relationships between these objects, so distance minimization is not necessary.
There's a similar question (https://ux.stackexchange.com/questions/29220/what-would-be-the-best-way-to-fill-space-in-an-user-interface-for-irregular-im) about laying out rectangular images while eliminating or minimizing white space. In my case, I want to equalize white space, clusters will be circular, and some clusters will be much larger than others.