Kangaroo

THIS FORUM IS NO LONGER ACTIVE. PLEASE POST ANY NEW QUESTIONS OR DISCUSSION ON:

https://discourse.mcneel.com/c/grasshopper/kangaroo

The discussions here are preserved for reference, but new questions posted here are likely to go unanswered.

Kangaroo is a Live Physics engine for interactive simulation, optimization and form-finding directly within Grasshopper.

Roller Coaster simulation - Lost momentum?

Hello,

As a first step to simulate roller coaster designs, I try to make a point follow a curve using Kangaroo, applying mass and gravity. It seems to work going downhill, but for some reason the momentum gained doesn't seem to help going up the next hill.

I feel like I'm missing some fundamental aspect here, but cannot figure out what that would be. I have searched the forums but cannot find anything that I think applies in this case.

So, why does my point stop in the valley? Anyone?

/Ola Jaensson

  • up

    Victor Leung

    It is the amazing friction of real world.

    (Or at least I guess it is)

    Try look into the Settings Input. It will take in a Kangaroo Setting Object which contains a friction setting. Check that out, if it doesn't work, yell again.

    1
    • up

      Daniel Piker

      Hi Ola,

      When the Strength input of the CurvePull component is set to some positive number, it acts much like the other force components - applying an acceleration at each iteration to pull the point back towards the curve whenever it moves away.

      However, when it is set to 0 as you have it, it acts as a hard constraint, and its position gets directly projected back onto the curve. Such hard constraints as they are in Kangaroo at the moment do not preserve momentum, as you have found. (When I first added it, I was thinking mainly of things like restraining the edges of a membrane to a boundary curve, where the sliding momentum is not important, but I guess for roller coasters it very much is!)

      I am working on a more consistent treatment of constraints, but for now I can suggest using a high strength (start with 2000) for the CurvePull strength, and maybe lowering the drag in the settings (try 0.5).

      1