I’ve made my own conversion to PDE Java 7 syntax from the original Python Mode sketch below:
Not only it runs on Processing 3 but also on browsers via Processing.js (Pjs) + Toxiclibs.js libraries.
There are some added small features like left-click pause/resume, right-click restart, middle-click toggle rendering, number keys for changing background color and key S for a snapshot!
Click the button “View App” at the right bottom side in order to run the sketch: