Install JSAnimation: See Animation in Python.
$UWHPSC/labs/lab15/JSAnimation_demo.ipynb
View at http://nbviewer.ipython.org/url/faculty.washington.edu/rjl/notebooks/JSAnimation_demo.ipynb
$UWHPSC/labs/lab15/WavePacket.ipynb
View at http://nbviewer.ipython.org/url/faculty.washington.edu/rjl/notebooks/WavePacket.ipynb
$UWHPSC/labs/lab15/WavePacket.py Script version
$UWHPSC/labs/lab15/Towers_of_Hanoi_animation.ipynb
View at http://nbviewer.ipython.org/url/faculty.washington.edu/rjl/notebooks/Towers_of_Hanoi_animation.ipynb
Note: These use $UWHPSC/labs/lab15/JSAnimation_frametools.py.
Create an animation similar to http://faculty.washington.edu/rjl/classes/am583s2014/Square.html.
Hints:
The following matplotlib commands may be useful:
fill(x,y,'b') # fill polygon specified by arrays x and y with blue
axis('scaled') # scale x and y axes the same way
Recall that to rotate a point $(x,y)$ through angle $theta$ you can can compute
\(\hat x = \cos(\theta)x + \sin(\theta)y\)
\(\hat y = -\sin(\theta)x + \cos(\theta)y\)
There is no quiz for Lab 15