pendulum animation works