Do not let compute_3d_grid return grid, it is not always used

Moreover itertools.product is much faster.
Minor changes
Use cmath.pi instead of np.pi everywhere for consistency