Source: https://neurophysics.ucsd.edu/courses/physics_120/Fourier_scan702.pdf