cosineLayers static method

void cosineLayers(
  1. Float32List g,
  2. TerrainOptions options
)

Generate random terrain using layers of Cosine waves.

Parameters are the same as those for {@link static DiamondSquare}.

Implementation

static void cosineLayers(Float32List g, TerrainOptions options) {
  multiPass(g, options, [
    Passes( method: cosine,                   frequency:  2.5 ),
    Passes( method: cosine, amplitude: 0.1,   frequency:  12  ),
    Passes( method: cosine, amplitude: 0.05,  frequency:  15  ),
    Passes( method: cosine, amplitude: 0.025, frequency:  20  ),
  ]);
}