Hello,

I am trying to “rebuild” a curve under elastic bending, so that it fits as closely as it can my base curve. I am using Kangaroo 2 for the physics and I am trying to do this with the optimization plugin Silvereye. I found a script somewhere that finds the max and min deviation between two curves, so the fitness input for silvereye is the maximum deviation, trying to minimize it. The problem is that Kangaroo takes time to compute and get to an equilibrium, so what I am getting is not accurate because the iterations keep progressing while my kangaroo curve is still approaching the goal geometry.

I either need to set gaps between the silvereye iterations or make kangaroo get “immediately” to the final equilibrium shape.

File attached:

kangaroo active bending geometry.gh (41.7 KB)

You can use the ZombieSolver for cases such as this.

As Anders says, the ZombieSolver is intended for just this sort of thing. It keeps all the iteration internal and only outputs the final result. Here’s a simple example with Galapagos

https://github.com/Dan-Piker/Kangaroo-examples/blob/master/miscellaneous/Catenary_galapagos.gh

Also - I looked at your file and notice that it is essentially a 2d elastica problem, but you are using a mesh with many hinge goals. It would be much faster to compute to instead use the Angle or Rod goal on a polyline, and extrude the result.

thank you both for your replies, Zombie solver seems to do the job. I didn’t build my file with only a polyline because I intend to use it for more complex geometries and thus wanted to test if I can play around with shapes in space rather than just on plane. It seems though that it might take longer time (as you noticed) to compute for more intricate geometries. Thank you for the observation.