Grasshopper

algorithmic modeling for Rhino

Hello all, 

I have just recently started trying to figure out lists in grasshopper (I am rather new to the program). 

I am wondering if there is a way to add each number on a list with the previous numbers and list them in order. 

So I'd like to take a list, and create this list:

0 . 0

1 . 0+1

2 . 0+1+2

3 . 0+1+2+3 

and so on... 

any help on this would be appreciated! 

Thank you, 

Paris 

Views: 1731

Replies to This Discussion

like this?

Yes! thank you! that is amazingly helpful! 

I was trying to sort items of an existing list in that manner, so I was able to use series in this format along with List Item to reformat them. 

Thank you!

i dont really get what you try to archieve, maybe there is a way that makes more sense?

I needed to move many objects, each one with a value + all the of values used to move the previous objects. This series allowed me to reformat the existing list in a way so I could use mass addition to get the values I needed to do so. 

It does seem like a lot of steps to do this. 

what I was trying to do was take an existing list such as:

0 . a

1 . b

2 . c

3 . ect...

and add the values like such:

0 . a

1 . a+b

2 . a+b+c

3 . a+b+c+ect...

can you think of a better way to do this?

Sounds like you want 'Partial Sum' from the Math->Operators->Mass Addition component.

That is exactly what I want! Thank you so much! That streamlines my method a lot! 

RSS

About

Translate

Search

Photos

  • Add Photos
  • View All

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service