Grasshopper

algorithmic modeling for Rhino

Hi everyone!

I have the following definition that generates a voronoi diagram from two different populate geometry points:

The blue cells are smaller than 6m2 and the red ones are bigger than 20m2.

What i want, is to merge the remaining ones so I have none remaining cells between 6 and 20m2.

The ideal would be to check area, if it's between 6 and 20, check the adjacent cells area (the ones that are between 6 and 20 also) and merge it with the smaller one. Check again, and merge again until it's bigger than 20... does that make sense?

I really don't know where to start, so any help would be greatly appreciated.

thanks a lot!

Views: 2251

Attachments:

Replies to This Discussion

Are you sure you don't just want to manipulate the density of your voronoi seed points to control cell size? Merging cells will change the geometry to something that wont have as much of a voronoi appearance (if that's the look you're going for...)

Yes, this is just a simplification of my real problem. In reality, this are architectural spaces. In the center I have smaller ones (circulations, bathrooms, kitchens, stuff like that) and on the outside bigger ones (living rooms, bedrooms, etc).

Anyway, the final form is pretty much what I outlined above, I just want to get rid of the In-between sizes, It doesn't matter if the end geometry is un-voronoi.

thanks!

At least running a few cycles of Lloyd's algorithm on your system evens out the randomness:

Lloyd's algorithm calculates the center of each cell then makes a new Voronoi from those new points. That equilibrates it. With enough cycles in my stack (or using a looping component), they would become nearly the same area all over.

In between cycles you can bias the points too, by moving them a bit, but I don't see how to use that well here yet.

Attachments:

Hi Nik, that's a good idea, thank you!

It's not exactly what I'm looking for because it takes away a lot of the interesting shapes de voronoi returns, but if I can't solve it another way, I try this approach.

thank you very much!

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service