News for hackers. Stuff that matters.
Re:Physics Simulations by rivaldo on Wednesday January 03, 2018 @07:32PM (#16066885)
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.

Code and explanation: http://www.physicsandbox.com/projects/double-pendulum.html

Demo: http://www.physicsandbox.com/projects/double-pendulum-sim.ht...

Re:Physics Simulations by evanb on Thursday January 04, 2018 @12:32AM (#16068279)
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.
Re:Physics Simulations by effie on Thursday January 04, 2018 @08:00AM (#16069995)
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?
Re:Physics Simulations by xchip on Thursday January 04, 2018 @07:24AM (#16069802)
Here is a n-pendulum, solved both iteratively (one constraint at a time) and simultaneously (all the chain at once)

http://htmlpreview.github.io/?https://github.com/aguaviva/Ph...