get_grid_points function

A function to decide grid points in a higher-dimensional space