Grasshopper

algorithmic modeling for Rhino

Adding numbers in a list sequentially - please help a newbie

Hi all... newbie question.

I have a list of integers 1,2,3,4...n

I want to move some geometry A,B,C,D...N that is related to this list. 

I want to move each piece of geometry a distance a distance equal to the sum of all the preceding integers in the list. 

i.e.

A moves 1 unit, B moves 1+2 units, C moves 1+2+3 units, D moves 1+2+3+4 units..etc

I'm sure there is a simple answer to this that I am missing but would appreciate any help.

Thanks

Mark

Views: 1168

Replies to This Discussion

'Mass Addition' has a 'Pr (Partial Results)' output.  Very handy for this.

Thanks Joseph.

Perfect!!!

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service