I have recently been tasked with creating an 'exploded' view for what amounts to a collection of shapes in a 2d coordinate plane. These shapes are all touching in some way. What I need to do is translate all of the coordinates of these shapes in such a way that I create gaps in between them with aesthetically pleasing gaps.
As stated before, I have a list of all of the line segments / arcs that make up these shapes. I've spent some time looking around on google, but honestly I think I lack the vocabulary for that to be effective. I'm not exactly a mathematician, and this might not be the right stack exchange for this so I expect this to be difficult. I'm merely seeking guidance here, not necessarily a solution. Any help here would be appreciated.
Say I start with this:
For reasons which are probably irrelevant, I need to group a set of these shapes together such that what I'll end up dealing with is this:
In this case I would end up with something like this:
However, the possible combinations of these shapes is vast, and I can end up with something more complicated like this:
Where I would end up with something like:
Note in the last example I didn't remove the lines for the shapes I grouped together, but fundamentally it's the same idea as the first example. The ones still touching are logically grouped, so I would imagine that I can treat them as a single shape. You can see from this that the configuration can get complex quickly. Perhaps I'm overthinking the issue, but this is the idea.






Here is one suggestion that may work if the polygons are convex (1): scale the whole figure by some (small) factor of increase - perhaps $10\%$, so $1.1$. The polygons will still touch one another. Now shrink each polygon "in place" by a factor of $0.9$, using a center chosen inside each (perhaps the centroid). Then the polygons will be the same size as in the original, but spread out.
You can adjust the stretch/shrink factor to meet your aesthetic goals.
Consider editing the question to show us a picture of what you start with and what you might be pleased to end up with.
(1) The comment saying they may not be convex means this method might not work. All the more reason to show us a picture or two of what you need.