Random selection of square diagonals to create pattern


I am sorry for the very easy question, I just dont seem to understand how could it be done. I have been trying more variants but cannot get the desired result. Any help would be very appreciated!
The idea is to achieve a “random” facade within a square-element standard. The square windows would have a diagonal (either ascending or descending) hence we have 2 elements. The idea is to randomly position these elements over the facade.
I tried (so far the method I’ve been used) to isotrim a surface into squares, dispatch them, debrep to get points and with the help of the points – get the diagonals.

I am pretty sure this might not be the cleverest way, as we are talking about regular squares and diagonals.
Nevertheless, my idea was – now that I had created the diagonals, I wanted to randomly select 1 diagonal per square over all the facade to get a random pattern. As the diagonals are grouped, this already becomes the first problem; but I dont honestly know whether this is the way to go. Should I somehow “ungroup” this diagonals and randomly selected or should I completely try another approach?

param-facade-diagonal.gh (15.4 KB) param-facade-diagonal.3dm (3.7 MB)

Once more,
thank you for the patience and help!

This is maybe just an improvement with Lunchbox: Diamonds grid, i don’t understand what you need.

param-facade-diagonal_2.gh (8.5 KB)

1 Like

Something like this is what you want?

param-facade-diagonal_re.gh (34.2 KB)

If you’d like to assign datatree path per facade…

param-facade-diagonal_reV2.gh (35.6 KB)


Is this the kind of look you are looking for?

param-facade-diagonal_random_element_selection.gh (27.6 KB)

Made two lists of the diagonal elements> merge, then jitter list> select half of the list.
Pretty destructive on the data structure, but you could sort through the resulting geometry in order to do further work on them.


Yes, HS_Kim!
Thank you for all the help today! You’re a savior :slight_smile:


param-facade-diagonal_2020Oct1a.gh (13.3 KB)

All the answers were pretty useful, thank you for the help!
Nevertheless – I might have not achieved what I would like to do.
To make the long story short, each square is supposed to be a window element, the diagonals are important because they divide the square into two triangular faces and either are offset outwards or inwards (the offset dimensions are only two; a and -a i.e. 150 and -150)
This is why I would need each diagonal to be equidistant and limited to the square it is found within.
Otherwise, the diagonals vary in length and it is not the aim.

The idea is to achieve something like this: https://www.pinterest.co.kr/pin/705094885381116075/

Thank you very much and sorry for the pain!

Why don’t you just replace your base geometries for Box Morph with your desired one?

param-facade-diagonal_reV3.gh (29.9 KB)

Each diagonal in my model is limited to one square. They don’t vary in length though adjacent diagonals make it look that way. By “offset outwards or inwards” do you mean extrude, like this?

param-facade-diagonal_2020Oct2a.gh (18.2 KB)

Or with extrusions corresponding to diagonal?

param-facade-diagonal_2020Oct2b.gh (18.8 KB)

Or did you mean only the corners are “offset” like the building you referred to?

Dear Kim,
This is exactly what I was trying to achieve. I have to admit that I have never till now, worked with the parametres and commands you’ve used, hence it is a bit more complicated for me to understand what you have done – even less for me to have achieve this by myself!

Thank you very much for the help, I will do my homework and read what all those commands do and how to use them!

Yes sir, this is exactly what I meant!
Thank you very much for the help! It was meant to be like the second variant, with the corners only :slight_smile:

So the code I posted with extruded triangles is not exactly what you meant?

I guess that means like the building in your image rather than extruded as I did?

param-facade-diagonal_2020Oct2c.gh (23.7 KB)

Personally, I like the extrusions better.