Source: https://www.cimat.mx/~jcpardo/fourier[1].pdf