Scaling random voronoi to uniform/regular

Hi there,

I have a collection of randomly spaced points (uk petrol stations) and I am looking create an evenly spaced version of this point collection, but maintaining the same adjacency relationships. I have attached the uk constituency map, which is a perfect example of how I was thinking to achieve this: by creating voronoi cells and then making all the cells even, but I cannot figure out this step.

Any help very much appreciated.


I don’t see any “attachment”? Points internalized in a GH file would be nice, in addition to any image.

whoops my bad, here they are! ta. (39.9 KB)

I don’t see the correlation between a hex grid “constituency map” and “an evenly spaced version of this point collection”? It’s fairly simple to create a hexagonal grid and color it based on point density, though gets slow at higher resolutions. (50.5 KB)

my thought, don’t take it too seriously :slight_smile:

you have a Voronoi diagram, I would first get the dual of those cells using something like starling pmDual component ( Starling | Food4Rhino )

then I would create a mesh out of those polylines (they are all triangles)
[I used MeshFromPolylines from Fox Fox | Food4Rhino ) (44.0 KB)

at this point it might “just” (lol) be a matter of relaxing that mesh and make it fit some boundaries (kangaroo → circle packing? will think about that while sleeping)

the thing is: if you exceed with the point-to-point distance, they will of course spread evenly inside their boundary into hexagonal-ish cells

for instance, with the points inside the rectangular boundary you have attached, you’ll always end up with an array of hexagons inside a rectangle, exactly like in @Joseph_Oster post

Assuming you want to keep the number of point (and thus hexagons) the same, is this correct? And some relationship to the underlying map?

I took a first pass using kangaroo to relax a delaunay triangulation:

Is this what you are looking for (see attached)? It’s not totally regular, which seems problematic. Maybe you can map the points back to a hexagrid overlay? Thoughts? (51.2 KB)

Cheers for the replies guys, yes that circle packing is very much along the lines of what I had in mind!

Thanks for the hexagon approach too though, although I was looking in this case for the cell number to be the same as the number of points, this is super useful to have learnt.

Grasshopper is so mind-blowing, im only a rookie but already determined to learn as much ASAP. Very appreciative of this great forum to make the otherwise impossible possible.
FYI, the next step for this project is try and create a ‘nationwide emergency waste strategy’, creating distribution patterns, with some petrol stations being central hubs surrounded by amounts per % of type of construction waste we produce. This will hopefully produce a ‘reproduction’ esk animation that grows out of the central hubs. wish me luck. This dense version of the point cloud is for communicating these patterns clearly.


1 Like