Grasshopper

generative modeling for Rhino

# Newtons method function ?

I would like to create a function which will calculate the value of x by Newton's method:

Basically here is what I want to do.

An example:

I input a value of 10, as x1 into function. Then:

F(x1) = x - ((x^2-612)/2*x) or if we for the x=10, we have:

F(x1) = 10 - ((10^2-612)/2*10) = 35.6

Then I want to compute the same function but for x = F(x1) which is in the upper case 36.6. Or in numbers:

F(x2) = 35.6 - ((35.6^2-612)/2*35.6) = 26.39550561

then:

F(x3) = 26.39550561 - ((26.39550561^2-612)/2*26.39550561) = 26.79063549

and so on for F(x4), F(x5)... up until (Fx100).

Is this possible in Grasshopper?

Views: 99

### Replies to This Discussion

Originally GH loops but does not use a plugin

http://www.grasshopper3d.com/group/hoopsnake

or maybe a small code in Python?

I found the hoopsnake method, but maybe Python code will be better one, as I will not need to click on Hoopsnake component and then on "Hoop all".

Maybe Python script will do it automatically.

Thank you for the help Fernando.

• View All