As you watch the animation (it loops) you'll see two things. First a bunch of unconnected rectangular and square shapes have lines drawn between only the closest ones until finally all of them are one connected whole. After that the border is enhanced with an fading outline, giving the entire thing a fuller body. The ultimate idea was to automate the creation of spaceship designs from completely arbitrary components. The smallest boxes were added just to influence the final shape of the connections.
Performance-wise the most expensive operation is the feathering. That alone has six iterations, one for each pixel expanded layer, and takes ~240ms (40ms per pixel increase!) versus only 14ms for the entire area draw and connection finding and drawing algorithm. Minus that feathering, this is something that could even be done on-the-fly as boxes are moved around or added.
The next step in this will be to add a user interface to add boxes and move them around in a grid. At some point I'll post the full source code so that, if anyone desires, they can review it, provide critique and perhaps better ways of doing some of the things, etc.