## Code Excerpt for Texture Model WoodStreaks

    Scalar StreakWidth; // in [0 .. 1] stepsize 0.1

    NoisePerlin perlin;

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

        streak_width_ = StreakWidth + 0.03;

    }

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

      Scalar value = 0.0;
      Scalar grain_alpha = 0.18;
      Scalar streaks_alpha = 0.5;
      Scalar planks_alpha = 0.05 + (0.2* smoothStep(streak_width_, 0,1)); // alpha dependent on streak width

      // planks for the background
      // make planks a bit random
      Scalar rings_noise_straight = perlin.noiseNormalized((x+22.0)*0.8, y*0.0, 0.2);
      Scalar tmp_straight = rings_noise_straight*70;
      Scalar rings_straight = tmp_straight - int(tmp_straight);
      rings_straight = fabs(rings_straight);

      // make the plank edges softer
      Scalar max = 0.9;
      if(rings_straight>=max) {
        rings_straight=(1-smoothStep(rings_straight, max,1))*max; // smooth step from max to 0
      }

      Scalar streaks, grain = 0.0;

      streaks = perlin.noiseNormalized(x * streak_width_ * settings_.resolution_x, y , 0.2);
      grain = perlin.noiseNormalized(x * 160, y * 120, 0.2);

      // all
      value = planks_alpha * rings_straight + streaks_alpha*streaks + grain_alpha*grain;

      return value;

    }