Finally, the double pendulum seems to be working pretty well
Of course the code used is from Daniel Shiffmann from Daniel Shiffman at The Coding Train.
Seems the problem was indeed that the formulas require radians, but since Vuo require degrees for Sin & Cos, the acceleration and velocities where too high, spinning the whole thing out of control.
A degree to radian seems to fix it.
It’d be nice to have a bit of clarity interacting with the physical forces like gravity and mass. Not esp. clear when changing those parameters. It’s like the system in underwater or something. Edit: I just saw in the YouTube comments that someone was addressing actual units – meters for radius, kg for mass, and some formula for gravity based on fps. It’d be nice to get more precise with this…
@jersmi hehe ;)
It took me so long to get this code into nodes, that I’m not sure I want to dive back into it ;)
At least not right now.
But yes it could still receive more work. Wanted to add the possibility to drag and drop the pendulum position with the mouse, change a value without having to restart the composition etc.
3D version ? You’re welcome to Or maybe a fake 3D that applies a noise movement onto the Z axis already ;)
You can also try a triple pendulum or maybe I thought about simply attaching a second double pendulum at the end of the first pendulum (not mathematically with the right formulas, but just with coordinates).
@bodysoulspirit, I adapted your approach here to Audulus (modular audio software with Lua-based vector graphics), took me about 20 minutes with your clear approach, which means you did indeed do the difficult part . When I did get it running in Audulus I realized that since this is a chaotic system, you need to be careful not to apply out of range parameters otherwise it’ll devolve into complete chaos. In this comp you choked it to 60 fps, which solves one problem. Adding the interaction you mention and refining parameter limits around physical units would definitely enhance the illusion.
Idk, maybe a 3D version wouldn’t be that unapproachable. The github formulas are separated into different sections instead of one expression. That might help make it easier to comprehend.
Ah yes, some limits should be good.
Doable in Vuo so that out or range parameters applied in Audulus automatically get clamped from within the composition.
And yes, indeed, I’ve played a bit with other parameters and the results can go crazy or be bad.
I’m not sure if there some errors in my composition, or if it’s just the chaotic system, should maybe compare with online examples in Processing that The Coding Train links to.
I’ve spent so much time on this, that once I got a satisfied result, I didn’t dive any deeper. Also don’t have the time recently :(
And regarding the splitted sections of the expressions, if we’re talking about the same thing, I remember trying to use these when debugging, but to split the formula into several nodes, I ended up with too much more nodes, and in the end if was easier to use one formula ;)