Source: http://www.sci.utah.edu/~gerig/CS6640-F2014/Materials/CS6640_F2014_Fourier_I.pdf