Press r to start recording. When recording, use the mouse to draw. After you're done, press r to stop recording. Finally, press space to see it redrawn!
This is just a quick thing I made for my class assignment. It's only meant to show off technical concepts, so it won't look that good.