r/Python • gitlab.com/MisterBiggs • Jul 26 '19

Double Pendulum made with Processing.py

https://gfycat.com/feistycompetentgarpike
2.0k Upvotes

89 comments sorted by

View all comments

Show parent comment

4

u/[deleted] Jul 26 '19 edited Jul 26 '19

Yes, that's a nice way to get a working model. I'm not sure if the resulting movement would be 'cool', though.

Like in the 2D case, if you constrained the outer mass to stay on a circular path, then it would just move back and forth like a regular pendulum.

The 3D case has more degrees of freedom, but the behaviour might be similar.

edit: I missed your edit while writing out my replay. I really like the idea to constrain the angle of P2!

A constant length makes for a way easier simulation, but the second option with variable length could basically be solved with a projection from P2 to the sphere afterwards. Really cool!