Source: https://eeweb.engineering.nyu.edu/~yao/EL5123/lecture4_2DFT.pdf