## Code Excerpt for Functions NoiseTurbulence

    double NoiseTurbulence::turbulence(double x, double y, double p){

      double amplitude, value = 0;
      double f = 1;
      for(int i = 0; i < 6; i++){
        f = pow(2.0,i);
        amplitude = pow(p,i);
        value += (noise(f*x,f*y, 0.2)/(double) f)*amplitude;
      }

      // normalize value to 0..1 range
      value = (value * 0.5 + 0.5);
      if(value < 0.0) value = 0.0;
      if(value > 1.0) value = 1.0;

      return value;

    }