Number Theory, Fourier Analysis and Geometric Discrepancy