Grasshopper

algorithmic modeling for Rhino

Hi,

I am writing a script with bunch of moving elements that attracts each other.

The problem I have that every step, the time of the whole process increases.

I think the problem is that there are lists, that contains not one member at a time, but increasing number of elements. For example 1st second there is 1 element, 2nd - 2 elements, n - n elements.

These lists are names as:

    posList = []
    velList = []
    massList = []

How to clear these lists, so every time there would be only one element?

I am attaching the gh file,  python small function (this file should be in C:\Users\.....User...\AppData\Roaming\McNeel\Rhinoceros\5.0\scripts) and printscreen of the python code.

Thank youn in advance,

Petras

Views: 183

Attachments:

About

Translate

Search

Photos

  • Add Photos
  • View All

© 2025   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service