Hi Everyone,

I am new to Grasshopper and need help with what I think should be a pretty straightforward task.

What I would like to do is be able to select a specific percentage of random points. However, I want to be able to select multiple different sets of random points based on number slider inputs.

For example, I populate a field of 100 points and then set slider 1 to 0.20, slider 2 to 0.40, and slider 3 to 0.40. My desired result is to have three sets of points- the first group with 20 randomly selected points, the second with 40 randomly selected points and the third with 40 randomly selected points. Ideally, all 100 points have been selected and no point has been selected twice.

The problem that I am having is that my current definition passes unused points from the first group along to the second group for the second round of selection of random points. Using the example above what I end up with is 40% of 20% not 40% of the whole.

Any thoughts on how to get each slider to sample the desired percentage of the whole while ignoring already selected points?

I have attached the *.gh file for the work I have done so far.

I appreciate the help in advance!

-Thomas

Random Percentages of Plants.gh (37.3 KB)