GhPython Seed Input

Hi All,

I am just making a simple random definition of points here and in the input I have made a “seed” which apparently affects the random pattern.
What is puzzling me is that this seed value isn’t included anywhere in the code but still taking an effect, can anyone enlighten me a bit as to why this is so?

sorry for the silly question! Thank you in advance!

1.1.8 random (15.2 KB)

Hi Yutaka,
I think you can set the seed value.

1.1.8 random (10.8 KB)

If you understand Japanese, the following link may be helpful.

Hi, the random generator is initialized everytime you re-run the code using the current time as the seed. That’s how it works.
So, what you are seeing is simply that everytime you moved the slider, you get a new collection of points, just it.

If the random generator is really initialized using the seed value, you should get exactly the same points when you move the slider to another value and move back to the origninal value. I assume you do not.

In general, the seed is used to get exatly the same numerical sequence regardless of how many times you ran your code. Good luck!

Thank you Masaki! Just a simple step to bring the real seed into the script thanks!
Yes it will be very useful thank you very much for the information!! ご丁寧にありがとうございます!これからもよろしくお願いします👋🏻

Hi Mikity

Thank you yes understood now , as you and Masaki kindly mentioned I need to use the “real” seed value !

Many thanks and all the best too​:+1:t2::clap:t2:

Thanks for sharing the information. If I want to set that the seed to seed distance will always be equal like 20, 25, 30 mm. Is it possible in this script. Thanks

I think an easy way to do this would be to multiply an integer by 5.

1.1.8 random (8.0 KB)

Thanks Masaki san for sharing the script. Actually, I want to set equal Voronoi size, which can be possible by setting the equal seed distance from nearby seeds, which will share the boundary with each other.

Hello AtikSarraz san,

I may not be understanding what you are saying properly, but if you want to make the spacing between the center points of Voronoi uniform, you could do something like Kangaroo’s Circle Packing and create Voronoi by obtaining the center points of the Voronoi.

1 Like

In case of Voronoi mesh in solid cylinder, there are some outlines (yellow color) formed at surface. This is from 3D CAD files. Is it possible to form Voronoi mesh in Cylinder without such outlines? Thanks.


Since this thread is about [GHPython Seed Input], it would be better to create a new thread about Voronoi.

Thanks Masaki san.

1 Like