The Wallpaper algorithm implemented in HTML5 / JavaScript