I want to simulate a a double pendulum in geometry nodes.
from this site.
However, the simulation is just a bit off. Either it will eventually just start spinning around in a circle
Or it dampens quickly and slows down
I've tried adjusting the timestep (g) but even with small time steps it runs into this behavior.
Essentially my logic tree is as follows.
- compute change in angular velocity w1' and w2'
- add this to the current angular velocity w1 and w2
- add this to the current angles theta1 and theta2
- Do this four times for the runge-kutta
- Weight the results for RK
- Send those values to the next sim step
I don't know if I missed a single value somewhere that messed it up but I would love to see if some else can crack this for me.
Here is the file if you wanna take a look at the labeled spaghetti