Single and double pendulum simulations