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.





