0
\$\begingroup\$

I'm trying to achieve the effect from https://www.iquilezles.org/www/articles/warp/warp.htm

enter image description here

with no success. Here is the experiment http://jsfiddle.net/fro5y0jm/15/ with canvas. Any ideas?

\$\endgroup\$
1
\$\begingroup\$

Looks like your domain warping amplitude is just too small.

Crank up your q to about 20x its current value and you'll get very pronounced domain warping:

Domain warped sample

I made this image by modifying your code to replact the 4.0* with 80.0*:

function pattern(x, y, scale, octaves, lacunarity, gain){
    var q = [
            fbm(x, y, scale, octaves, lacunarity, gain), 
            fbm(x+5.2, y+1.3, scale, octaves, lacunarity, gain), 
      ];

    return fbm(x+80.0*q[0], y+80.0*q[1], scale, octaves, lacunarity, gain);
}
\$\endgroup\$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .