Distribution of Points by Distance

So I’m trying to work my way through a problem, and maybe it’s just the crazy time we’re living in (or maybe it’s working from home and having my cat trying to distract me) but my brain has just run up against a wall with this one.

I have this wavy chandelier as shown below. The wave structure you see is a big plate, each of the points is a light hanging from the plate. I have three sizes of light - we’ll call them Small, Medium, and Large for now. I have 10 small, 20 medium, and 30 large.

What I want, is a semi-random distribution of S, M, and L lights, but I want it such that it’s far more likely to have a small light closer to the red circle, and far more likely to have a large light closer to the green circle
.

I thought of measuring the distance between the midpoint of the end at the red circle and all the points, but then like I said, my brain is hitting a wall as to how to make this work.

Any pointers or suggestions?

Could you use the dispatch component? The mask for the dispatch would be where you could manipulate which points are chosen. Maybe create the mask for just one size at a time, like the smallest first. Just a thought. If I get some time I will “noodle” this.
Good luck,
Bill

Interesting topic!

Here some thoughts… I don’t have a solution.

Here is how I imagine the usual “gradient culling” … often seen in other grasshopper cases:
(Usually I’ve seen it as for culling, but instead of “removing” we can easily think as “replacing”)
2020-03-26 14_44_52-Window
On X axis the parameter, on Y axis the % of each element.
At the start of the solution only Element A can exist, halfway 50-50, at the end only B.
The division curve can be non-linear…

----------------

But, what if we have more than 2 elements?
By “chaining” the same concept we can get something like this:
2020-03-26 14_45_01-Window
But we’ll have the start and end elements having half area of intermediate elements… and at some parameters only one element is possible (like at 0.5) or at other parameters only 2 at time (like 0.25 and 0.75).

----------------

So, if we think at something like this:


(the splitting curves are actually parabolas with vertexes on the rectangle corners)
We can have:
- Each element have the same area; (I think this is the crucial part.)
- At any parameter (except for exactly 0 or 1) we have a non-zero chance for each element to appear. Though this might not be strictly wanted/needed…

For your case I would find the parameter of each of your points and then “cast” a vertical line on this graph and make a random point on that line. Where the point fall is the chosen element.

But… this “solution” would be stupidly heavy and probably there is a better math-only one.
Also, it would be really interesting to solve this for N elements, not just 3.

(Here the 3dm file used for the pictures multi-element gradient picking.3dm (142.3 KB) )

1 Like

Here is another way to look at it. Thanks to both Joseph_Oster and Riccardo Majewski. I looked at both of your posts and as always learned new things.

Good Luck,
Bill