N-body collision simulator (conversing momentum and kinetic energy) in JavaScript.