Grasshopper

algorithmic modeling for Rhino

Hi

I am working on a gcode generator for lines in rhino with grasshopper. I have to make a list with cumuluative values from a list with numbers

the algorithm should be something like

oldvalue(0) = 0

for i = 1 to (listlength)

newvalue (i) = oldvalue (i-1) + oldvalue (i)

and then output the list newvalue

example:

oldvalue = (1,2,3,3,2,1)

then newvalue = (1,3,6,9,11,12)

is there a simple command in grasshopper or should this be made with a script (python?)

Wout Zweers

Views: 186

About

Translate

Search

Photos

  • Add Photos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service