
schemes.sponge1<-function()
{
  local function rampFunc(t)
  {
    t=t*2-1;
    return 1-fabs(t);
    // return 1-pow(t, 2);
  }

  // local map=HmapMask.fromSimplexNoise(rndf(10, 50)/10, 16, 1, null, rndf(0.3, 0.7))
  // local map=HmapMask.fromSimplexNoise(rndf(10, 50), 4, 4, FloatRamp(rampFunc), rndf(0.3, 0.7))
  local map=HmapMask.fromSimplexNoise(rndf(10, 40), 4, 4, FloatRamp(rampFunc), rndf(0.3, 0.6))
  apply_height_mask(map)

  chem_layers_by_height(irnd()%5+2)
  // chem_layers_by_height(0, HmapMask.fromSlope())
  common_erosion(50<<10, { Kq=0.1, Kr=0.9, Kd=0.1 })
  recolor_chem_layers()

  add_water_by_height(rndf(0, 50), 0)
  add_common_grass()
}


schemes.hills1<-function()
{
  add_fast_noise(0, rndf(20, 80), null, GT_ROCK, 255, 0.5)

  chem_layers_by_height(irnd()%5)
  common_erosion(90<<10, { Kq=0.1, Kr=0.9, Kd=0.1 })
  recolor_chem_layers()

  add_common_grass()
}


schemes.hills2<-function()
{
  add_fast_noise(0, rndf(10, 20), null, GT_ROCK, 255, 0.5)
  add_voronoi_hills(32, 0, 5, 1)
  chem_layers_by_height(irnd()%5+2)

  add_voronoi_hills(8, 0, 20, 1)

  common_erosion(90<<10, { Kq=0.1, Kr=0.9, Kd=0.1 })
  recolor_chem_layers()

  add_water_by_height(rndf(-10, 20), 0)
  add_common_grass()
}


schemes.ridges1<-function()
{
  add_fast_noise(0, rndf(10, 20), null, GT_ROCK, 255, 0.5)

  add_voronoi_hills(32, 0, 5, 1)
  chem_layers_by_height(0)

  add_voronoi_hills(8, 0, 20, 1)

  apply_height_mask(null, @(h) -h)

  common_erosion(30<<10, { Kq=0.1, Kr=0.9, Kd=0.1 })
  recolor_chem_layers()

  add_water_by_height(rndf(-50, 50), 0)
  add_common_grass()
}
