예제 #1
0
 public PerlinNoise1D(float from = 0, float to = Mathf.PI * 2, float ampl = 1, ushort freq = 100, float pers = 0.5f, float lacu = 2f, byte count = 4)
 {
     _octaves = new CoherentNoise1D[count];
     for (byte i = 0; i < count; i++)
     {
         _octaves[i] = new CoherentNoise1D(from, to, ampl, freq);
         ampl       *= pers;
         freq        = (ushort)(freq * lacu);
     }
 }
예제 #2
0
 public PerlinNoise1D(float from = 0, float to = Mathf.PI * 2, float ampl = 1, ushort freq = 100, float pers = 0.5f, float lacu = 2f, byte count = 4)
 {
     _octaves = new CoherentNoise1D[count];
     for (byte i = 0; i < count; i++)
     {
         _octaves[i] = new CoherentNoise1D(from, to, ampl, freq);
         ampl *= pers;
         freq = (ushort)(freq * lacu);
     }
 }