A program that reduces a grid of squares to lower drawing complexity