createNIGrid function

creates a grid for numerical integration.