Marching squares improvements: options, allowing base directory, color flipping, and toroidal wrapping for the edges