Random-falling sand (or paint) Rosetta Code task