gridpts function

Generate a grid of points