Divide a curve in growing segment with GH

Hi everyone, I would like to have your help on something.
I am quite new in using math in my work on GH so I don’t know if what I want to do is even possible but I am sure it could since it is pure logic.

I would like to create a file that I could use to divide a curve into multiple growing segments, using a growing factor. Here is a formula I found to be effective :
L being total lenght of the curve
r being the growing factor
n being the number of segment
x being the lenght of the first segment

L = x + x*r + x² + … + x^n-1
On the picture you will see a basic exemple

My purpose is to find a way to express this in grasshopper and be able to modify n and r

I hope I made mysefl clear, excuse me if I wasn’t. Speaking of math in english is not as easy as I thought.
Many thanks for your help ! :grinning:

Hello
welcome to the forum
Nothing too difficult, explore grasshopper and as you wrote the equation the idea is to
Make a series of power 0,1,2 … with Series component
Then Exponent with Exponent component
And sum with not so easy to find Mass Addition
Then division with division component !!

And explore Grasshopper find some good way too learn, Grasshopper primer is a good way to understand but the best way is to dive in Grasshopper and solve the problem by yourself.

1 Like