Creating Digital Art Using 2D Fourier Transforms
Creating Digital Art Using 2D Fourier Transforms
By Gustaf Ullman
Introduction
Digital art can explore concepts and techniques rooted in mathematics. One such method involves the use of two-dimensional Fourier transforms to create intricate and randomized patterns. This article outlines how to generate "lumpy" images in CMY (cyan, magenta, yellow) using a simple spectral construction.
Method
The process begins by specifying a radially symmetric amplitude profile in the spatial-frequency domain, for example:
f(r) = A exp(-br)
where r is the radial frequency (distance from the center in the Fourier plane), A is an amplitude scale, and b controls how quickly the spectrum decays with frequency.
Next, assign a random phase to each Fourier coefficient, sampled uniformly in [0, 2π), and form a complex spectrum
F(k) = f(|k|) · exp(iφ(k))
where k denotes the 2D frequency coordinate and φ(k) is the random phase field.
The image is then obtained by applying the inverse 2D Fourier transform (inverse FFT) to F. The result is a "lumpy" spatial pattern whose characteristic scales are controlled by the chosen radial amplitude profile.
To create a color image, generate three independent random phase fields for the CMY channels, construct three independent spectra, and take an inverse 2D transform for each channel. The channels are then normalized and combined into a final RGB image.
Results
Below are examples of the generated patterns:
Low Frequency
High Frequency
Conclusion
Fourier-based synthesis makes it possible to generate complex patterns from a simple, controlled spectrum. The visible image can look noise-like, while its global structure is determined by the spectral amplitude profile and the phase relations encoded in the Fourier coefficients.
Kommentarer