Earlier quoted context omitted.
Me too. Lagrangian mechanics are almost the only thing about my physics undergrad where I still recall thinking "wow this is awesome!"
Where can I find a good introduction to Lagrangian mechanics?
Double Pendulum in fewer than 100 lines of JavaScript
21–30 of 55 posts
Re: Double Pendulum in fewer than 100 lines of JavaScript
#22Earlier quoted context omitted.
Me too. Lagrangian mechanics are almost the only thing about my physics undergrad where I still recall thinking "wow this is awesome!"
Where can I find a good introduction to Lagrangian mechanics?
http://www.abebooks.com/9780201657029/Classical-Mechanics-Go...
Re: Double Pendulum in fewer than 100 lines of JavaScript
#23Earlier quoted context omitted.
Chaotic systems are deterministic (as shown by a deterministic computer algorithm simulating one). They just aren't predictable except by simulating them (which constrains us by time and accuracy).
No, that's not it. Chaotic systems are very sensitive to input conditions, where a tiny change yields a completely different result. With a non chaotic system a small change in the input yields are small change in the output, so it's possible to calculate approximately and get useful results, not so with Chaotic systems.
Re: Double Pendulum in fewer than 100 lines of JavaScript
#24It would be cool if you could turn on and off a trail of one mass or the other.
I bet it can produce some nice spirographic(?) shapes!
Re: Double Pendulum in fewer than 100 lines of JavaScript
#25Earlier quoted context omitted.
No, that's not it. Chaotic systems are very sensitive to input conditions, where a tiny change yields a completely different result. With a non chaotic system a small change in the input yields are small change in the output, so it's possible to calculate approximately and get useful results, not so with Chaotic systems.
I don't think that conflicts with what I said?
That's why the "butterfly effect" is used as an explanation of chaotic systems (albeit in my opinion a not a very good one).
Edit: changed contradict to conflict
Re: Double Pendulum in fewer than 100 lines of JavaScript
#26Earlier quoted context omitted.
I don't think that conflicts with what I said?
I don't think it conflicts with it, but I believe the correct explanation has to do more with tiny changes producing big ramifications than with being deterministic or not. That's why the "butterfly effect" is used as an explanation of chaotic systems (albeit in my opinion a not a very good one). Edit: changed contradict to conflict
Re: Double Pendulum in fewer than 100 lines of JavaScript
#27I assume you can plot the y-axis position of the pendulums over time easily enough, and detect cross-overs... How would you discover the set of inputs where cross-overs will happen, but most infrequently?
Re: Double Pendulum in fewer than 100 lines of JavaScript
#28I did this about a year ago: http://www.dllu.net/dp/ It barely exceeds 100 lines of js though... I have a whole bunch of similar physics simulators here: http://www.dllu.net/programming/physics/
Re: Double Pendulum in fewer than 100 lines of JavaScript
#29My dynamics course teacher actually showed that the double pendulum can be linearized by some approximations (throwing out some negligible terms, small angle approximations etc.), and that way two modes of oscillation could be found: antisymmetric and symmetric oscillation. Just try with small initial angles with OP's script and you'll see.
Re: Double Pendulum in fewer than 100 lines of JavaScript
#30Earlier quoted context omitted.
Me too. Lagrangian mechanics are almost the only thing about my physics undergrad where I still recall thinking "wow this is awesome!"
Where can I find a good introduction to Lagrangian mechanics?