pretty clear explanation
the following will build a grid, create lines on each grid vertex that point to +Z, and build spheres on 3 random points for each line
gh_test_Re.gh (16.0 KB)
in order to change the simulated randomness, you can play with this slider:
the 3 points along each line are found as % of line length, where 0% is at their base, while 100% is at their top:
this also means that -for instance- let’s say you want the first and last 15% of each Line to be empty, you can just type 0.15 to 0.85 as random Domain, and you’ll get something like this:
[in the attached gh file I have replaced the Sphere with MeshSphere because it’s faster to build geometries)
if for each line you want to allocate spheres of different diameters, data is now organized as lists of 3 points for each Line, you can just determine the 3 different radii and jitter them by the number of branches you have, for instance:
speaking of collisions -which is not a thing in the above definition-
there might be many ways to avoid two colliding spheres, the easiest one (but it also much limits the number of possible configurations) would be to give to each of the 3 points its own Domain of existence, where these Domains are spaced between each other and non overlapping
This means that the first point will be for instance always in the first third starting from the bottom, the second point on the middle third of the Line, and the last on the top third like this:
but this also means that scenarios like the following could never occour, as all the points appear to be in the first third of the curve
if you are happy to explore, I would suggest a Loop approach
each line is randomly populated by a point at a time, and a check is executed to verify that the new point we are going to place is distant enough from
a) the last one inserted
b) all the other points in any line
c) all the other points in that very same line
if you populate a list of center points and a list of radii, you can indeed always check if a new sphere (Point with Radius) will collide with the other ones using Distance, which will make things pretty fast… if it’s distant enough then proceed, otherwise just generate a new random point and check again, rinse and repeat until all Lines are populated by the desired number of spheres
that would require some -basic- coding, or -if you are open to using plugins- probably you’ll need Anemone
but to do that it’s important to know some more details about sphere-radii distribution: you mentioned 3 different radii, I guess you mean each line will receive 3 spheres in total, one for each radius?