If you recognize the effect it may be because you have seen it before:
http://www.complexification.net/gallery/machines/sandstroke/
http://www.complexification.net/gallery/machines/sandDollar/
http://www.complexification.net/gallery/machines/limbsandstroke/
http://www.complexification.net/gallery/machines/sandTraveler/
In order for this code to run you must first download and install:
fast sand paint
: https://github.com/inconvergent/fast-sand-paintfn
: https://github.com/inconvergent/fn
The code also depends on:
numpy
scipy