Array and randomly and rotate an object ONLY with specific angles

I want to create an array where an object is randomly rotated by 0, 90, 180, 270 or 360 degrees. Is like if I have square tiles that I randomly place on the floor… they need to rotate by 90 degrees to be placed side by side.
In the file I attached the tiles rotate randomly 0-360 degrees.

In white on Rhino the result I would like to have.
This is what I have done based on this tutorial

Thanks for your time (8.2 KB)

1 Like

please internalise your data so we can work with it!

this is one way of getting 0/90/180/270/360 degrees. simply get a random number between 0 and 4, round it and multiply it by 90 (using the expression component).


Thanks for your super quick replay!
Sorry this is my first post, I dont know what and how do I internalise my data…
Anyway your system works perfectly!
Thanks a lot

Hi Amir,
I have an extra question. How can I randomly select from 3 different tiles?
(in white on Rhino an example of different tiles and the result I would like to get


infinity.3dm (54.4 KB)

have a look at this: (12.6 KB)


Thanks again for your support.
I will give it a look asap!