Sampling on the grid