draw grid and sample tiling