The logic is fairly simple, IMO.
There are two rectangle units, so I generated a bunch of item indices which are 0 and 1.
But if you use regular Random, then you can’t help but getting 4 ~5 consecutive 0 or 1.
In order to avoid this, I used some predefined list(01, 10…) and shuffling them using Jitterand finally break them into individual characters usingChars.
And I just added Shiftfor more control over the desired pattern you want, you can skip it if you want.
And the next step, by using these indices, you can choose the two rectangle’s X-sizes, and sum up usingMass Addition and convert the partial sums to points usingNumbers To Points.
And the next step, you can deploy these points by their row(tree branch respectively)using rectangle height.
Finally, all you have to do is to place two rectangles using these points as positioning vectors and Move.