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.
Hi Daniel,
I have tried the Origami example file you shared.
I noticed, that the folding process is depending on the rest angle which is useful to avoid the penetration when the folding factor up to 1(while 0 develop into a flat paper...).
There are some challenge Origami which required 100% folding + collision in order to create certain force to 'push and roll' them together, for example a flasher Origami:
I have tried this like below:
The foldability is fine, but I can’t solve the Problem of penetration based on self-collision.
Do you have any hint for that?
Thanks in advance!
Daniel Piker
Okay, here's something that hopefully will help.
I wrote a new variation of the hinge goal that prevents the mesh folding through itself.
(because it is a custom goal, you will need to right click and update the referenced assembly location to your own copy of KangarooSolver.dll)
It was a bit tricky because we can't simply clamp the angle to some range, since all fold angles from -pi to +pi are valid. So we need to determine whether any change in sign of the fold angle is the result of it passing through itself or just an allowable switch of direction.
I tackled this by keeping track of whether the fold is currently a mountain or a valley, and only allowing this to switch when the angle is <pi/2.
Now this will only prevent individual pairs of joined faces from folding through each other - some origami designs might require actual collision prevention between non-adjacent faces, but that will require some additional work...
Nov 8, 2016