algorithmic modeling for Rhino
I am new to GH
I have a random set of circles in my list.
I want to sort the list (of circles) into branches so circles of the same size are ordered into their own list.
So I can then perform further operations by selecting the branches individually.
Any help is appreciated
Thanks
Tags:
I'd sort of like to keep the circle generating part separate from the circle culling part. Here's one possible approach that uses weighted randomness:
Each potential circle is associated with a number that tells you how likely it is to get picked. So if you want more big circles then you give those a weight close to 1 and small circles a weight close to zero. This allows you to play around distributions without using hard constraints.
Another approach would be to not pick circles randomly, but pick them in order. Then, if you supply all big circles first they will get handled first.
To get this second approach working, replace the line
int idx = _random.Next(0, _potential.Count);
with
int idx = 0;
Generate fewer circles to begin with?
Random Reduce the output if you feel there's too many of them?
Use the [Random Reduce] component to remove a bunch of objects randomly from a collection.
Welcome to
Grasshopper
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
© 2024 Created by Scott Davidson. Powered by