Double Pendulum in fewer than 100 lines of JavaScript
physicsandbox.com
Double Pendulum in fewer than 100 lines of JavaScript
1–10 of 55 posts
Re: Double Pendulum in fewer than 100 lines of JavaScript
#2Re: Double Pendulum in fewer than 100 lines of JavaScript
#3Feature request: mount the pivot on a programmable cart. It'd be fun to write software to balance the double pendulum.
e.g. https://www.youtube.com/watch?v=B6vr1x6KDaY
and, balancing a triple pendulum: https://www.youtube.com/watch?v=cyN-CRNrb3E
Re: Double Pendulum in fewer than 100 lines of JavaScript
#4Re: Double Pendulum in fewer than 100 lines of JavaScript
#5I remember when I first learned about the Lagrangian, and my mind was blown that really complicated problems could be wrangled so easily. Thanks for sharing this :)
Re: Double Pendulum in fewer than 100 lines of JavaScript
#6Re: Double Pendulum in fewer than 100 lines of JavaScript
#7Re: Double Pendulum in fewer than 100 lines of JavaScript
#8Ain't that a chaotic system which is not deterministic?
Re: Double Pendulum in fewer than 100 lines of JavaScript
#9Would be even better, IMO, with a line in the simulation showing the path traced by each pendulum over time, preferably the arcs drawn could phase through different colours (and possibly decay in visibility). Nice work though.
(Note: code was never intended to be visible to the public, and this is old and bad. But hey, it works!)
Re: Double Pendulum in fewer than 100 lines of JavaScript
#10You can get a vigorous chaotic motion going with a high top mass, low bottom mass, and high angles.
1. Max Mass 1
2. Min Mass 2
3. Max Phi 1
4. Min Phi 2