A scala implementation of a painterly algorithm