Exercise: AnimationΒΆ

Let $x$ represent a point in the spatial interval $[0, 10]$, let $t>0$ represent time, and let $$ f(x, t) = \frac 1 2 (x+t)^2 + 2 \sin(10(x-t)). $$ The following tasks are to be completed in a .py python file (not in a jupyter notebook).

Task 1: Use matplotlib.animation module to display changes in the plot of $f$ over $x$ with respect to time $t$.

Task 2: Use the celluloid module to perform the same task. Which is faster? Which is more convenient?

Task 3: Add a text labeling the time at each snapshot that the animation is composed of.