Same random value per branch

Hi all!

I have a quiestion. How can I make a random component that has unique random value in each branch?

I’m trying to make a facade where each section of panels rotate with the same angle, but every section should be different.

I would like it to look something like this:
0 0.1
1 0.1
2 0.1

0 1.33
1 1.33
2 1.33

0 0.45
1 0.45
2 0.45

Hope you guys can enlighten me :slight_smile:


The way I would do this is:

  • Make a list of random values, with as many values as branches there are in the first list.
  • “Match Tree” or “Unflatten” the random values, making a list which has the same branching as the first one, just with one value per branch
  • Rotate the panels in the first tree with the random values. Even though the list lengths are different, Grasshopper will stretch the shorter list to match.

Hope that makes sense.

1 Like

Sorry. Wrong canvas in original post. Here’s the correct one.


Here’s the gh-file. 20181130_random (13.2 KB)

Hi J porral,
Thank you for your response. I’m not sure I understod your way to do it. I have posted the gh file below.
I’m grateful if you could have a look at it.


Hi j porral

I tried to follow your recipie. It looks like the tree structure is OK, but it still produce too many panels when rotated. See attachment.
Any thoughts where I’m doing something wrong?


You need a list a of seeds which (S) to make a varied list of random values.

Hi Michael

Thank you fror your reply.
I’m not sure I understood what you meant. How can I input a list of seeds?

I want the values from one list to merge into the other list. And the end result should be the same amount of panels rotated, and not multiple as it is now.

See attachemt.

20181130_random (17.5 KB)

Not sure this is what you want, anyway IMO, you’ll need data matching. See white group.

20181130_random (21.2 KB)

Sorry I’m away for the weekend! I might get some time later, but did @HS_Kim solution work for you?

Hi @HS_Kim

Thank you! That’s just what I wanted to do. I have to train my data matching skills.