I have a bunch of 2D geometries (slate tiles as a wall facade) that I want to randomly cull in a gradient based on their relative distance to a point. The walls closest to the point should be 100% covered, while the walls near the perimeter should have almost no tiles on them. Any advice or tutorials I’ve missed would be greatly appreciated!
I have highlighted the tiles and point in pink on the script.
GH - - Distance random cull.gh (77.9 KB)
Rhino - Distance random cull.3dm (18.4 MB)
A bit wordy but not sure how else to put it,
Thanks 
Hi @Benedict_O_Flaherty
Here’s the basic take on the subject. You can add additional tweaks to it, but basically you control the distribution with the graph mapper - so it’s not completely linear.
The algorithm itself is simple. Remap the distances to [0,1], and generate equal amount of Rnd values in that same range. Then evaluate, whether the Rnd value is larger than the remapped distance. You get True/False values, and the further you go in distance, the smaller the propability (of the Rnd value being larger) is.
GH - - Distance random cull_Commented.gh (84.3 KB)
1 Like
That is just perfect, thank you very much!
1 Like