Simulation of double pendulum