How to control length of edges in Voronoi pattern

Hello everyone,
I would like to control the edges length of a voronoi pattern, let’s say no edges smaller than 20 cm. Right now I am able to control the density of the points that define the pattern, in this way I can have a more dense/sparse pattern.

Can I define a rule that control the edges length of the pattern? Can I do it before the pattern is generated?

Something like “if edge length < 20 then extend it to 20”.

Here is a screenshot of the definition I have written so far, it is also attached at the end.

voronoi on triangular shape.dyn (12.7 KB)

Any help will be greatly appreciated!

1 Like

sorry, new users cannot attach definitions… :joy:

You will need to move the point generating the cell. The lengths of the lines are determined by where the points are. If you adjust the line itself it is no longer a voronoi pattern.

Hi steven, thank you for your reply. Moving the points is actually the best way to resolve the issue! I am trying to do so using Geometry.Translate and it is working, but it means to individually adjust every point on about 500 triangular panels.
It would be great to find a process that evaluate the points and move them before the pattern creation. In fact in my algorithm I’ve tried to do so by deleting the points that are too close each others using Points.PruneDuplicates with a tolerance of 400, but that didn’t solve the problem, not even increasing the tolerance. Do you have any suggestion about how to “place them” in such a way that will give me a pattern with edges greater than a defined value?

To my understanding that is fairly advanced stuff. You will need a fluid code to continuously move the points until it reaches a set standard.

Not sure how you are generating the points but if using random points you can create lets say 100 of them and then analyze each one using Dynamo to see which ones pass which ones are close and which ones fail.

Sorry I am not more helpful but fluid code is way above my head. Maybe someone else will have better news for you.

I agree with you, this sound pretty complex… here is my definition, now I can share it!

voronoi on triangular shape.dyn (12.7 KB)

This would be a good time to consider using project Fractal to test all possible point layouts for a given shape, and then limit your outputs to those with shortest line lengths >=20.

1 Like

@matteomandrile I noticed in the top left corner that there seems to be a line missing in between points? is that an error or done intentionally? I’m encountering a similar issue and not sure why the line is not coming in between the two points. do you know how to solve that?

Hi Damien! Did you solve the issue? I wonder about it too~

1 Like