port of an old processing sketch