Grasshopper

algorithmic modeling for Rhino

Hello, first post.

I've been trying to figure out  how to control the number of iterations Kangaroo performs. I want to point it at an array of meshes and do one at a time for 1000 iterations each, bake it out and go to the next.

I've looked through the forum posts and google But I've found no way to do it.

Here's what I've tried:

- Using a Repeat component to do a true/false loop as input only resets the engine. It does not increment the iterations. Just alternates the reset.

- The "sequence" component is promising but it seems to output a range of frames simultaneously. I only want the 1000th iteration not 1-1000. 

I notice that the sequence component is just outputting a series of boolean values. One True followed a series of False. Is there a way to capture the 1000th false  value only?

I also noticed that version 0.095 has a "Remote timer controller" feature. (I'm using version 0.096). What is this feature? Can it help?

Thanks for any help,

Josh

Views: 3347

Attachments:

Replies to This Discussion

I also noticed that version 0.095 has a "Remote timer controller" feature.

This is instead of [Timers] to access it you need to double click the Kangaroo Component.

There is a Step Button "|>" but probably not what you are after.

@Daniel I noticed that the "discoverability" of the new Kangaroo Panel is is harder than "obvious" if you added it to the right click context menu and/or the Grasshopper View menu then it might be easier to find. 

Good point Danny, thanks - I'll look into that

Hello Josh,

welcome to the forum.

Here's one way of doing it. You always need at least 2 frames for the sequence component to work - the first one is there to initialize the simulation. By setting the 'SubIterations' to your desired number of steps, you can control how far the simulation advances in one frame.

I realize this may not be the most intuitive way of controlling things - I'm trying to come up with a better solution, but it is tricky combining it with the grasshopper data tree system in a way which is both flexible and clear, and any suggestions would be welcome.

One possibility I was thinking of is a separate Kangaroo component for running simulations without the timer (maybe it can be called 'dead kangaroo' to distinguish it from the 'live' version!).

If any of the inputs need to vary over the course of the simulation, they could be given a branch per frame (and then there would be no need to have tree input on the Force-objects input of the 'live kangaroo', so I could just auto-flatten there, which could simplify things)... hmm, have to think about this some more

Daniel,

Thanks  Daniel. This works well. But I found that a simple boolean toggle was better than the sequence component. When I went to bake using Sequence, I found I had twice the geometry I wanted. I think that Sequence, set to 2, outputs both the rest state and the final state. I just want the final state.

Another important question: If i have an array of 200 meshes how can I pipe them through Kangaroo sequentially? Doing all at once is not possible for my machine.  I want to send one mesh at a time to Kangaroo, perform the simulation, bake it out then send the next. This would be easy (conceptually) in a For loop. How could I begin to do this in Grasshopper/Kangaroo? 

I guess this is more of a Grasshopper question than Kanagroo. What should I be looking at? 

Regards,

Josh

Yes - it's true that Sequence, set to 2, will output both starting and final state. You can select the second from the output using the List Item component as shown above. If there are more objects, then split the list in half, and it will be the second half.

Because of its iterative nature, Kangaroo works rather differently with data trees than standard Grasshopper components, which does make computing an array of separate simulations like you describe a bit complex.

You can input many meshes at once into Kangaroo and simulate them simultaneously (though if they overlap, their points will get combined - so to stop this you may need to separate them in space, just for the simulation).

If it is too much to simulate all of them at once, maybe you could look into some of the automatic baking scripts which have been posted. I know Giulio Piacentino wrote one for rendering which can be linked to a slider. "Human tools" by Andrew Heumann might also be useful.

Hi


Thank you 


Just in case if anybody wants to do this by kangaroo2

 rain%20flow%20analysis.gh

RSS

About

Translate

Search

Photos

  • Add Photos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service