Interpolate and shift points from different lists

Hi Guys,

I have a problem, i created these points using a Grid an manipulating it a bit. I am new to GH and know that the script is a bit long but for now thats what i have.
Now i wish to connect the points as shown in the first picture. I am guessing i have to use Shift. I just cant seem to figure it out.

Any ideas?

Best regards,
zo0my

Reference:

My Work:
admission_1.gh (20.1 KB)

missing

:frowning: This kind of thing (below) is definitely not “the Grasshopper Way”:

missing2

a cleaner solution by manipulating tree data
gradient_grid_by_sqrtsqrt_fibonacci.gh (16.6 KB)

1 Like

First of all, thanks for your quick answere!

@Joseph_Oster yea I didn‘t really know how to do it… in the end i just tried to somehow replicate the image.

@adel.albloushi what is it you had in python? I just see wight boxes because there is a missing component.

I found a too complex way to connect everything, but now I just want to figure out a better way.

here are the scripts, left to right
the first one outputs a fibonaci sequence (which you can change to whatever intervals you want)

input: limit → type hint: int
output: Fibonacci

if limit == 0:
    Fibonacci = 0
    quit()

Fibonacci = []
Fibonacci.append(1)
if limit == 1: quit()
Fibonacci.append(1)
if limit == 2: quit()

for i in range(2, limit):
    Fibonacci.append(Fibonacci[i-1] + Fibonacci[i-2])


the second basically is a running sum - for each index, the value is the sum of all the previous indexes from the the fibonacci

input: numbers → typehint: float ->here, make sure to have “list access” turned on in the input
output: runningSum

a = []

a.append(numbers[0])

for i in range(1, len(numbers)):
    a.append(a[i-1]+numbers[i])

runningSum = a

for completion, here’s a gh script for rhino 7 with those two components
fibonacci_and_runningsum_gh[r7].gh (5.1 KB)

Hey

A slightly different way to do it. Hope it helps :slight_smile:

Since the pattern is repeatable within a rectangle, you might as well just draw the whole pattern within a source rectangle and map it out to the rectangle grid, instead of doing complex data tree manipulations.

Deformed rectangular grid.gh (17.4 KB)

no data trees → conceptually simple
-deleted attachement -
stable version here

1 Like

Thank you for that! I figure this one works good, but for me a bit too complex because of the Code itself…
I will try the second one too.

But all in all, I think this one solves it in the best way for me to easily understand! Thanks. I will try all procedures to check the way they work.

You guys helped me lots! @adel.albloushi @thomas.holth

a more stable version
parametric_diagrid.gh (17.6 KB)

well, the main point is that often there are multiple ways of achieving something. good luck on your path

hint: learn about data trees. they will help you quite a lot

1 Like