Mix two patterns using gradient?

I was hoping to use a gradient to control the blend distribution of two patterns (see uploaded image). Let’s say I have two shapes A and B. Could it be possible to use a gradient to control distribution of each along a gradient?

Any advice greatly appreciated!

is that the exact gradient you’re wanting to use?

because if so, i think it will end up being all squares on the left half… then an abrupt change to circles which finish the right…

is the example A&B picture what you’re expecting as the final result?
or something different?

do you want each row to be controlled differently (and i’m making the mistake of looking at the example picture as one thing instead of 4 things?)

idk : )


Excellent questions. You are right that there would be an abrupt change if there was a strict interpretation of the gradient.

I guess wed like to use the rows to control a blend jitter using th gradient? Is this the right method?

do you want to be able to use Rhino only?
or is Grasshopper or a script ok too?

Oh I thought this was a grasshopper forum. Yes, I am looking for grasshopper options.

This could be a way…

PatternGradient_re.gh (14.9 KB)




That is a great solution! I’m going to parse through it to better understand how you added randomness.

Sergey: what is the “Attractor Geometry Possibility” component? I don’t seem to have that?

Thanks everyone!


Just a quick follow up question: how does the Jitter component know to fade from one side of the series towards the other? In other words, why isn’t the jitter shuffling all the X coordinates of each cell and why are some (like the ones at each end) remaining un-shuffled?

Much appreciated

Thanks Sergey for the plug in tip.

Hi Michael, I posted the same question there as well. While waiting for an answer I was curious how the jitter works specifically on the entire sets and why in this case it is not applying the jitter to each item if that makes sense…?

Because of this:

But in your case it is like:
Original list = {a,a,a,a,a,a,a,a,a,a,b,b,b,b,b,b,b,b,b,b}
Jitter = {a,a,a,a,a,a,b,a,b,a,b,b,a,b,a,b,b,b,b,b}

The effect is the same however you have only two values essentially split equally on each end of a list. As David said

The ‘distance’ each item is allowed to move is controlled via the strength parameter.

So with a weaker jitter things can move say up to 5 spaces at random (this doesn’t mean they all move 5 just that they can potentially move 5). Most likely they will be replaced with the same value they are already because of the nature of the list (many “a’s” next to other “a’s” and many “b’s” next to other “b’s”). However, at the point where “a” meets “b” in the original list is where you will get the most jitter because here “a” is most likely to be replaced with “b” and vise versa hence why you notice a mixing of shapes there creating the effect of a gradient. Then a few others are randomly switched further away here and there because of the random nature of jitter (those few hit the upper end of allowable switching distance, creating the result effect.)

1 Like

Michael Pryor, Thank you for this explanation!! This is very clear now. Thanks all for your help. If you are ever in Portland hit me up and I will buy y’all beer! :slight_smile:

1 Like