Python 2d Mesh Generator