Grasshopper

algorithmic modeling for Rhino

is there a way/structure to perform an operation on a data set and use the result of this operation to feed the same operation again (with a defined step depth)?

this would avoid copying sets of components after each other again and again. It would be very useful for all kinds of self-feeding iterations/loops (geodesic sphere tiling, random walkers, 'geodesic uphill hiking')

Do i miss some essential concept or is it impossible due to the component/frame-based nature of grasshopper?

To better understand, here is some vb/pseudo code to demonstrate what would like to do in gh.

--

sub begin
    'get initial set of points
    arrPtsSource = getPoints
    
    'loop to repeat function
    for i = 0 to intStep
        
        'perform operation on every point of the set
        for j = 0 to ubound(arrPtsSource)
            arrPtsResult(j) = doSomeFunction(arrPtsSource(j))
        next
        '================================
        'overwrite source set with result
        arrPtsSource = arrPtsResult
        '================================
    next
        
end sub

--

thanks for any comments

Views: 498

Replies to This Discussion

This is not possible without scripting in Grasshopper. You could use either of the flavours of .NET - VB or C# within GH, but neither works the same as RhinoScript.

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service