algorithmic modeling for Rhino
Hello all!
I'm learning to do some C# scripting with Kangaroo. I was wondering if there was a built-in or easy way to test for convergence of a simulation within the Library, or do I have to make my own checks on particular geometry?
I'm trying to script a kinematic chain that adds nodes as needed, which requires adding geometry and goals to the model after running kangaroo, and then re-running it. Right now I have to check the geometry after every step to see if it has converged within a certain tolerance...
Thanks!!!
Tags:
Hi Oliver,
You can use KangarooSolver.PhysicalSystem.Getvsum() as a check for convergence.
This returns the sum of the squared lengths of the velocity vectors of all particles, so when it gets close enough to zero things can be considered to have stopped moving.
There's an example showing this in use here:
https://github.com/Dan-Piker/Kangaroo-examples/blob/master/scriptin...
Hi Daniel,
Thank you so much! that is exactly what I was looking for.
You Rock!
Oliver
Welcome to
Grasshopper
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
© 2024 Created by Scott Davidson. Powered by