Grasshopper

algorithmic modeling for Rhino

Hello!

I have a list of numbers, that are divided into branches. What I want to do is create a polyline for each branch, that uses those numbers as it's coordinate.

In other words, what i have are the lengths of the segments of the polyline and I would like to construct it from those lengths.

The problem is that each next coordinate should be added to the sum of the previous values. Somehow similar to Fibonacci.

What I have in the script works fine for this particular number of items in the list, but is a very manual way of doing it. And since my list is a subject of change (both in a number of branches as well as in a number of indexes inside of them), I would like to achieve a more automatic way of doing it.

I am sure there must be a simple solution, but I cannot figure out how to do it.

Thanks for ideas! Denis

Views: 592

Attachments:

Replies to This Discussion

Hi.

I guess there could be another nice solution, anyway this is one way.

Attachments:

Thank you Hyungsoo Kim, works perfectly! Mass Addition is what I was looking for.

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