Exercise from my Algorithmic animation class