## Code Excerpt for Texture Model PerlinContrast

    Scalar Frequency; // in [0 .. 1] stepsize 0.01
    Scalar Stretch;   // in [0 .. 1] stepsize 0.1
    Scalar Contrast;  // in [-3 .. 3] stepsize 0.6

    void TexturePerlinContrast::setupParameter(const std::vector<Scalar> &parameter)
    {

        frequency_=  pow(2,2 + Frequency * 6);
        stretch_= Stretch;
        contrast_= Contrast;

    }

    Scalar TexturePerlinContrast::evaluate(const Scalar &x, const Scalar &y)
    {

      Scalar t = noiseNormalized((1-stretch_)* x * frequency_, y * frequency_, 0.2);

      Scalar value = 0.0;
      Scalar alpha = exp(contrast);

      value = (t > 0.5) ?
        ( 1 - (std::pow (( 1 - t) * 2.0, alpha) * 0.5) )
        : ( std::pow ((t * 2.0), alpha) * 0.5 );

      return value;

    }