Circle-ish packing: Collision and flow with deformation?

I’m after a method of circle packing that is more organic/blobtastic.

Example of a traditional cp collider below with tension initiating a lovely flow. The script as well, if anyone is interested, though it’s your standard Piker lunch special #4 variety.

cp collider square
cp square (28.7 KB)

What piqued my interest recently was this excerpt from “Hopper flows of deformable particles” showing off circle packing and deformable soft body particles. Figure (b) is something I see often when overstuffing circle packed boundaries. To go from overlapping to tangent with deformation would be pretty cool, especially with tension/flow direction factored in without much squishing.

How possible is this in Kangaroo? My own attempts at packing deformed shapes or deforming packed circles have been crashworthy endeavors and I’m not sure the effort is necessary when it’s mostly the aesthetic I’m trying to recreate.

(EDIT: I’ve also been trying to achieve a more organic looking circle packing using Project, Map to Surface or Sporph’ing on circle packed grids and various surfaces to get the illusion of deformation and flow, no winners so far)


In those figures it looks like they’re using a similar approach to what we’ve discussed before here

I agree though, that if what you are after is that general look and shape for a large number of cells, then treating each cell as a chain of many capsules or spheres and doing collision might not be the most efficient way to go. Making a distribution of points for the cell centers and using some meshing or Voronoi type division could make more sense.

Let’s try and clarify what exactly it is you are looking for here though (and in your other recent post, which I presume is about the same project).
Can you define it?

In both these posts I’m seeing a 2d arrangement of non overlapping cells of roughly similar but non identical areas (or possibly with areas changing smoothly over some gradient), with rounded polygonal shapes so they fill the space with few gaps. There is also some anisotropy going on here (in parts the cells are elongated, following directions of some smooth field).
I suggested mapping (using Sporph or similar) in the other thread because that’s one easy way to turn an isotropic pattern into an anisotropic one.

One thing that complicates using a simple Voronoi approach is the distinction between the anisotropy of the distribution of points or cell centers and the anisotropy of the cells themselves.
Here’s the difference between starting from a uniform distribution and doing a non-uniform scaling of a then taking the Voronoi, vs taking the Voronoi then doing the non-uniform scaling of that:


Thank you, let me let that sink in and respond.

In terms of the project, yes those posts are related, just exploring different concepts on a general theme. More organic/blobby circle packing.

Below is an initial experiment, but I’m not really satisfied with this image packing and projection approach, it’s very random and I’d like to control the flow and direction more.

image (38)
image (39)
image (40)

I know there is a lot more I can do in terms of making the gradient/img packing and various surfaces work together but after seeing that paper on Hopper behavior I though about circling back (pun) to collision based packing. A system like this would be interesting, how the pieces are queuing up and elongating toward the exit.

EDIT: I also thought about “bad circle packing.” I could use the bridge system from the ring dome thread to find the middle of each near-enough tangent connection, pull them together and re-interpolate. If the spacing is bad enough, it could be visually distorted. Likewise maybe I could pull those tangents in another direction but I always end up with a little curve overlap, enough to cause a potential headache in physical assembly. I tried to push the curves off each other but it caused them repel too much… “push off but remain tangent” is another Kangaroo thing I’m trying to figure out.

cp bridges