Click canvas to reset

Source code:

Built with Processing
Rendered with Processing.js