# Bubble pattern

Hey everyone, could someone help me out with this? I’m trying to make a bubble pattern on grasshopper more specifically using kangaroo to simulate the “squishness” of the bubbles between each other, something like this:

I went through the topics and used parts of a few scripts some folks posted, but no good so far. I only managed to achieve this:

Using triremesh and and tangent incircles

So, what I was trying to do was to constrain all those circles inside the rectangle boundary and deform them with one another, like the first image.

Best regards

You could use a Voronoi pattern as polygonal boundaries, with your circle centers as the circumcenters of the cells.
Keep in mind that a physics-based simulation might get heavy for lots of colliding geometries.
If you’re looking for something more lightweight, which might also yield similar results, you can look into filleting or smoothing the Vornoi cells instead.

This example might be useful:

I agree with diff-arch that starting with either a Voronoi, or the incircular dual (which will give a result similar to Voronoi but without tiny edges - Minimum length inside the voronoi - #3 by DanielPiker), then deforming the cells will be easier than generating the whole packing from collisions.

Also, I think the behaviour in your first image is a bit more complex - some of the cells seem to be pushing over each other slightly in 3d, and there’s some variation in cell stiffness that looks random and not just a factor of cell size.

Hey Daniel and diffarch, thanks for the reply, I actually was looking up that exact same configuration Daniel posted, failed to get it working possibly for being too new to kangaroo, but yes, I’ll make sure to give it a try to your voronoi idea, but in advance I would like to ask how could I achieve the closest possible result in the first image as you mentioned? Pushing each other in 3D and etc

What is the image actually of?
As I say, it looks like something more is going on than what can be modelled as a pure 2d pressure/collision simulation with similar elements, but knowing where it came from could give some clues.

If I’m not mistaken it is the representation - a less complex one at that - of coral pores. I was attempting to, initially, have each “bubble” compress each other and then scoop out that void out of each one. You think I could achieve that?