FbmNoise
From Odwiki
Fractal Brownian Motion Noise (fbmNoise)
fbmNoise is computed by adding different diminishing frequencies of noise together to generate a richer noise.
The noise() function typically has a base frequency of 1. If you want to find a noise function of frequency 2, you simply have to multiply the sampling parameter by 2. This determines the lacunarity of the fbm noise.
When each frequency (or octave) of noise is added, only a fraction of the higher frequency terms are summed into the resulting noise. This allows the function to converge on a nice smooth function without requiring infinite computation. The fraction by which each higher frequency is summed is related to the fractal dimension of the noise.
So, a simple fbmNoise function in VEX might be written as
float
fbmNoise(vector pos, lacunarity; float fscale; int octaves)
{
int i;
vector fpos;
float result, scale;
fpos = pos;
result = 0;
scale = 1;
for (i = 0; i < octaves; i++)
{
result += scale * noise(fpos); // Sum the noise of the current octave into the result
fpos *= lacunarity; // Adjust the frequency for the next octave
scale *= fscale; // Adjust the scale for the next octave
}
}
Since the lacunarity parameter is a vector, this allows for different lacunarity in each dimension of pos.



