Learning Scientific Programming with Python (2nd edition)

P7.7.1: Animating a pendulum

Question P7.7.1

Use Matplotlib's FuncAnimation class to produce an animation of a swinging pendulum with an initial maximum angle from vertical and zero initial velocity. Integrate the equation of motion numerically, and repeat the animation after one period of the motion.