algorithmic modeling for Rhino
Hello all (first post ever!), I'm completely stuck trying to recursively add the elements of several lists. I'll try to be super effective at explaining what I mean:
- I want each element of a list to be the sum of itself and the elements before it. ie (1,2,3,4) becomes (1,3,6,10)
-I need to do this for several lists of arbitrary length ie (1,2,3) (2,3,4,5) becomes (1,3,6) (2,5,9,14)
Doing ONE list is easy by making a series of series of indeces (0) (0,1) (0,1,2) etc
However, when I try to create the a "series of series" for SEVERAL lists, the whole thing breaks down, and I believe it has to do with the branch structure. Maybe there's something crucial I'm not grasping about datatrees?
The image shows where the whole thing goes wrong (and how the datatrees are not matched up as they should be) The definition is also there to play with.
Thanks!
Tags:
Hi Jaime,
Use the "Mass addition" component.
To bad NING doesn't inform you someone else has already posted as your posting ;)
Welcome to
Grasshopper
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
© 2024 Created by Scott Davidson. Powered by