Awesome stuff!
A few months back I found a double pendulum simulation in less than 100 lines of JavaScript. It was a ton of fun to play around with the code.
For an accurate double pendulum you almost certainly need a symplectic integrator---not just Euler's method---or risk numerical instabilities that come from nonconservation of energy.
An integrator that is symplectic or conserves energy isn't necessarily accurate, especially if the dynamical system is chaotic. Can you recommend particular algorithm that is accurate for pendulum or double pendulum?
Code and explanation: http://www.physicsandbox.com/projects/double-pendulum.html
Demo: http://www.physicsandbox.com/projects/double-pendulum-sim.ht...