Isolating data points from trees to create a series of triangles

Hey all, I’ve been digging around for 3 days now and got to a dead end in terms of finding a lead. I’m trying to create V shape stairs along a tower as in the picture below:

ASCENT (15.8 KB)

I have a data tree for the points along every core column and the points on every circle. my question is how can I mask these trees to get a series of isolated points to connect with lines?

in a later foreseen problem, I would want to alternate the column points in way that no line would cross the inner circle. any advice on how to execute it is welcomed.

Thanks for any answer in advance!!

I believe this is something similar to what you are looking for:

ASCENT (21.7 KB)
[edited the gh file a couple of times to make the core logic a bit more consistent]

but I changed a bit the way external points are generated:

I added this slider that multiplies the number of columns by a value you chose to keep the pattern consistent, in such a way the number of points on the external circle will always be a multiple of the number of columns

wow thanks for the super fast and accurate reply!! would you mind explaining the logic behind the bottom part with the repeats functions?

thanks again. thats is already a big leap forward for me!!


yeah no problem :slight_smile:

let’s take a sample “layer” where all the points have the very same Z height, like the following:

I have set the number of columns to 3, and the multiplier slider to 5, so you get one list of “inside points”, one per column: 0, 1, 2 ; and another list of “outside points”, m times number_of_columns, in thise case 5 x 3 = 15 points numbered 0 to 14

because the inside circle (where column points are created) and the outside circle are an offset of each other, then we know that both the curves have same direction and have a “congruent” seam, which means they also have the same “starting point” (and believe me, this is a big thing :slight_smile: )

because I have set m to 5, it means that I have 5 steps in between each column
so the very first 5 steps will all have start_column = 0 and end_column = 1, the only thing that changes is the external point they traverse

1st step → column_0, external_0, column_1
2nd step → column_0, external_1, column_1
3st step → column_0, external_2, column_1
4st step → column_0, external_3, column_1
5st step → column_0, external_4, column_1

represented all together they look like this:

after the first m (set to 5) steps, you have to swap columns, so the first column will be 1, and the second column will be 2:
6st step → column_1, external_5, column_2
7nd step → column_1, external_6, column_2
8st step → column_1, external_7, column_2
9st step → column_1, external_8, column_2
10st step → column_1, external_9, column_2

probably you see the pattern now :slight_smile:

assuming you have n columns, m multiplier and s steps, it will move like this m times
column_n, step s, column n+1
column_n, step s+1, column n+1
column_n, step s+2, column n+1
column_n, step s+3, column n+1
column_n, step s+4, column n+1
then after m repetitions you add +1 to both columns, which become:
column_n+1, step s+5, column n+2
column_n+1, step s+6, column n+2
column_n+1, step s+7, column n+2
column_n+1, step s+8, column n+2
column_n+1, step s+9, column n+2
and so on:
column_n+2, step s+10, column n+3
column_n+2, step s+11, column n+3
column_n+2, step s+12, column n+3
column_n+2, step s+13, column n+3
column_n+2, step s+14, column n+3

so the bottom part of the script is just generating the very same indexes to recall those very same items on different layers:

[edit] now that we know how the steps should zig-zag on the two lists of points, we need to know how many steps we have in total, and can take that info from here, which is total height [integer_division] step height:

and finally, because points are already organized in branches starting from min_Z to max_Z, for each step (for each branch) we take an iteration, meaning each branch contains a step, and the next branch contains the next step

1 Like

Thanks for this detailed explanation! that’s incredibly helpful. Im definitely learning a lot here. did you notice this mismatch between the Divide of the columns and the Move of the outer circles? it resulting in non-planar steps…

1 Like

yes, you are right, there was a mismatch! :slight_smile:

tried to fix it here:

ASCENT (24.1 KB)


Grazie mille!!! :smile: