Remove objects based on probability / percentage

Struggling to figure out how to create a cull pattern (or similar) where the TRUE/FALSE is driven by a preceding likelihood of occurring. For example if I’ve got a grid of points and want them to have a % chance of being removed as we move to the right. I can get a list of percentages by remapping the point distances from a curve, but can’t figure out the next step of using those percentages to drive the chance of points being removed.


remove points.gh (11.2 KB)


remove points_re.gh (13.1 KB)

1 Like

A few more components will do.

1 Like


Here is a simple module of “probability”.
It actually is very useful in all kinds of programming.

1 Like

Thanks. Didn’t realize you could sort a list like that - quite cool using the distance as a key to order the list in proximity to the curve.

Kim’s program will have some problems if your curve is not aligned with points grid.
A more common way is stick to your idea of “probability”

I like the way @HS_Kim created some granularity by creating groups of points that were each governed by their own seed, but your examples helped me understand some basic logic that I wasn’t considering. Thanks for the probability module pic.

1 Like