Source: https://www.lirmm.fr/~strauss/MasterEEA/TP3/TP-Fourier.pdf