I am trying to replicate "Frequency Synthesis of Landscapes" by P. Bourke in Python. I thought it would be a simple
import numpy as np
from scipy.fft import fft2, ifft2
whitenoise = np.random.uniform(0,1,(256,256,3))
fouriertransformed = np.fft.fftshift(fft2(whitenoise))
pinktransformed = np.reciprocal(fouriertransformed)
pinknoise = ifft2(np.fft.ifftshift(pinktransformed)).real
but it seems to be way more complicated. How can I achieve this, and how can I check that the power really falls of by 1/f**2 in the resulting image?