top of page

7D Mango is a tool to generate turbulence in seven-dimensional space. The turbulence is a function from 4-dimensional space-time (t, x, y, z) into a vector space of dimension d. For d=1, the output is a scalar field, similar to smoke density. For d=2 or 3, the output is a vector field, which can be constrained to be divergence-free (incompressible) or to be the gradient of some random scalar field.

The technique used is inverse spectral synthesis. First, a random complex Gaussian noise is sampled on a 4-dimensional grid of size N_t x N_x x N_y x N_z in the spectral (Fourier) domain. It is then multiplied by a frequency spectrum of the noise we want to generate. We offer two spectra: a fractal and Gaussian. To generate the turbulence, we use a straightforward inverse Fast Fourier Transform (FFT) that only handles powers of two. For arbitrary sizes, one could use a package like FFTW from MIT.

Various fields can be generated by setting the sizes accordingly:

  • N_f controls the dimension of the output: =1: scalar value, =2: two-dimensional vector field, and =3: three-dimensional vector field.

  • N_t controls the number of samples in the temporal domain. When =1, a single frame is generated. When >1, a periodic sequence of turbulence is generated. It wraps seamlessly in time and thus provides turbulence defined for all times.

  • N_x, N_y, and N_z control the dimension of the spatial domain: curve (N_x>1, N_y=N_z=1), 2D density (N_x>1, N_y>1, N_z=1), and 3D density (N_x>1, N_y>1, N_z>1).

A curve plot is also generated when N_t>1 and N_x=N_y=N_z=1.

The data is periodic and can be used to tile all of space and time. I wrote the first version in the dark winter of 1996-97 in Finland. It is based on my SIGGRAPH 1993 paper and my PhD thesis and resulted in the publication "A General Animation Framework for Gaseous Phenomena." These papers are available on my publications page.

You can save the turbulent field in either a JSON file or a CSV file.

©2018-2026 by Jos Stam.

bottom of page