calculate min and max tiles
calculate intersections across lines