thebookofshaders/12
Patricio Gonzalez Vivo 059b16148d adding iq links
2015-03-19 17:17:43 -04:00
..
1d-fbm.frag noise + fbm 2015-03-19 17:06:41 -04:00
2d-fbm.frag noise + fbm 2015-03-19 17:06:41 -04:00
clouds.frag impruving sutff 2015-03-19 17:15:23 -04:00
index.html adding non edited chapters 2015-03-15 11:35:14 -04:00
noise.frag adding non edited chapters 2015-03-15 11:35:14 -04:00
README.md adding iq links 2015-03-19 17:17:43 -04:00

Fractal Brownian Motion

At the end of previus chapter we were thinking on noise as random waves. This wavely nature of noise is what makes it such an interdisciplinary concept. In fact, in acustics, sound is be constructed by the manipulation of the amplitud and frecuency of a sin wave;

y = amplitud + sin( frequency );

Harmonics

An interesting property of waves is that they can be add up. For example, adding harmonic octaves together produce that something like the following graph.

for( int i = 0; i < 4; ++i) {
    y += sin(x*PI*float(i))/float(i);
}
y *= 0.6;

But on other side adding sine waves of different frequencies and amplituds will produce something very chaotic.

Think on the surface of the ocean. This massive amount of water is propagating waves across it surface. Waves of diferent amplitud and frequencies.

1D Fractal Brownian Motion

By adding different octaves of the same noise function we can gain some extra granularity from the noise. Take a look to the following example and progresively change the for loop to do 2,3,4,5,6,7 and 8 iterations. See how incrisinly fragmented this wave function becomes.

2D Fractal Brownian Motion

This fine level of fragmentation is what we are interested. ...

Using Fractal Braownian Motion

http://www.iquilezles.org/www/articles/morenoise/morenoise.htm

http://www.iquilezles.org/www/articles/warp/warp.htm

http://www.iquilezles.org/www/articles/dynclouds/dynclouds.htm

great!