Added basic animation code for the n pendulum.