Using a square grid, I want to apply a triangular shape inside of each square. What I am trying to figure out is how to randomize the rotation of each of these triangles. The screenshot below shows the desired triangle shape, but they are all rotated the same way.
Method used for constructing the triangle:
- Select one of the four available segments
- From the centre of each square, draw two lines to both end points of this line segment.
How can I randomize which segment gets selected per cell?
I have done an alternate version where I split the grid into 4 groups of cells (which are randomly distributed), and then I just manually configure each rotation by List Item selecting the appropriate segment. But Iām curious whether one can simplify this. The project that I have in mind has multiple shapes on the same layout, which if I had to configure each rotation separately it would make things quite laborious.
Any assistance would be appreciated!
triangles test.gh (6.8 KB)