The optimization of plots（Voronoi&Kangaroo）

Hi all, I’m a really new grasshopper user,
Recently I saw the following GIF on the Internet, and this project is about the optimization of plots. I think to do this have to make some rules(I just try……):
1.Keep area(㎡） in a domain
2.Keep every plot in a fixed length-width ratio
3.Eliminate sharp corners
4.Building orientation(Vector)
This is the Reference image(gif…you can refresh the web to see again):

And I use kangaroo to test whether these rules can achieve the goal of optimizing the plots.
First, I use the Voronoi polygon to simulate the initial plots.
Next, I try to test the Rule1(Keep area(㎡） in a domain) .But the results are not ideal. I have some problem for the result :
1.Is there any force in Kangaroo can be used in my case?There are PolygonArea and OnCurve.
2.How to use Plankton mesh with Kangaroo? I think halfedge data structure is meaningful in this case, but I don’t know how to use it to simulate the plots.
3.How to keep the points on the line never move outside the boundry?
Initial plots:

Result:

There is my gh file. Can you help me? Thank you!!!

The optimization of plots.gh (21.9 KB)

Up! Up! Up! Up! Up! Up! Up! Up!

I’m not sure I fully understand what you’re trying to achieve but it looks like the initial gif might be using Lloyd’s algorithm.

You’ll need a looping component in Grasshopper to implement it like Anemone or Loop Snake.

I have no idea of how to use Anemone and Loop Snake to do this. Do you have some train of thought ?

1. Actually, I regard the Voronoi as plots of land.
2. And then, I want to get regular shapes (similar to a rectangle) .But my results are not the same as the gif.

I haven’t tried it myself but it shouldn’t be too difficult.

This thread is a bit old but the idea is there. I think the polygon centre component has been updated to have multiple outputs, you’d want the area centre.

1 Like

Hi,

I’ve done something similar using K2. I’ve adapted it to the voronoi diagram. The workaround is a constant tension goal for the edges of the polygons to avoid overlapping and quickly bring it down to 0.0 so the system can converge to equal areas.

btw if it is just for the “looks” of your study, are you aware of this functionality of the random points component.?

Best,
M

3 Likes

Wow!!!
It’s very nice work!!!
I should try it !!!
Thank you !!!

I’m not sure I fully understand what you mean of the question.
I know the functionality of the “populate 2D" ,but I haven’t used the “P”(Points of list).

Hey @m_tsiliakos
I have tried your gh image. But there is a in my file, when I connect the “ConstantTension” to the “Solver”, it gives me the following error: 1. Solution exception:Object reference not set to an instance of an object. If I don’t connect the “ConstantTension” to the “Solver”, the file is OK, but the result is not ideal.
So can you upload your gh file to me ? I want to check my file.
Thank you !!!

Sure @583043191

Let me know if it helps.171130_kangaroo_Equal_area_Voronoi.gh (18.4 KB)

Best,
M

3 Likes

Well, you mentioned

But this is not achieved by my solution. Maybe introducing an angle clamp close to Pi/2 will help.

Cheers
M