This repo contains a Swift playground that illustrates the 2D image FFT (Fast Fourier Transformation) algorithm.
Note that the original code is in Javascript, which is written by @turbomaze. I just rewrite it in Swift and play it in Xcode playground. You can find the original JS implementation at here.