This was originally written in Python for PyWeek #14. There is also an
html5/canvas port.