Slinky simulations in both python and javascript