Hex grid with adaptive density

unhandled

#1

Hi All,

I was looking at some sample scripts for hexagonal grids with varying cell densities and came across the below using Kangaroo by @DanielPiker:

In order to allow the pattern to act like a mass spring system, the set of cells/curves are flattened and fed into the kangaroo engine. I’m wondering if there’s any way of getting the data structure back after the system reaches equilibrium (such that one can still query each cell as a polyline)?

Files from the original thread attached.
nervsys.3dm (66.4 KB)
nervsys.ghx (300.0 KB)

In addition, since this was from 2011, might anyone have other thoughts on achieving a hex grid with varying density?
Is there a path in transforming circle packing to hexagonal grid (instead of delaunay/voronoi)?

Thanks!


(Daniel Piker) #2

distort_hexgrid.gh (21.2 KB)
Here’s a go at updating this for the current Kangaroo (and allowing you to get the hexagons out)

Not sure about what you’re after relating to circle packing. The dual of the Delaunay, or the Voronoi of the circle centres would be more hexagonal the more regular the circle packing is.


#3

thank you for an updated version!
regarding circle packing, i was just hoping for a workflow that can map the desired density/distortion of the line distribution better(?) than simply being attracted by points. but am not sure if transforming the distribution of circles to a hexagon-filled pattern is possible.


#4

Hi Daniel,

Could you explain a bit the first anchor component?
Why is it that two points are fed into the T input while one is into the P input - what is the component trying to do?
When unplugging that particular anchor component from the solver, I also don’t see much difference in the result.

Thanks!


(Daniel Piker) #5

About going from circle packings to hexagons - here’s a way of doing it using the image based circle packing goal:


imagehexdensity.gh (17.1 KB)

This file also uses the barycentric dual component from here and I made the initial coloured mesh using MeshPaint
(The barycentric dual of the Delaunay gives more even edge lengths than just using Voronoi (which would be the circumcentric dual))

You’ll notice if you look closely that they aren’t all hexagons with this approach. You need a few pentagons and heptagons in there to allow the size to change smoothly without the cells becoming very stretched like with the other approach shown above.

About the anchor component in the previous def - T is the target point, and P is the initial point. This is to allow you to drag the target around while the simulation is running without the solver thinking it needs to add a new particle. In that example the location of the initial point P doesn’t really matter.


#6

this is great, thanks so much!

relating to the below link, if baycentric dual is taken from circle packing with a fixed number of radii, would the resulting polygonal pattern also feature a fixed number of unique units? I’m guessing not, but is there a way of doing so (for instance, 5 types of hexagons, 3 types of pentagons, and 2 types of heptagons…etc.)?