PerlinNoiseNoise Method (Double, Double, Double, Int32) |
Note: This API is now obsolete.
Namespace: DigitalRune.Mathematics.Statistics
[ObsoleteAttribute("This method is obsolete. See remarks.")] public static double Noise( double x, double y, double z, int numberOfOctaves )
Exception | Condition |
---|---|
ArgumentOutOfRangeException | numberOfOctaves is negative or 0. |
This method is obsolete. It is recommended to manually combine noise generated by the PerlinNoise.Compute methods as required. For example: .
double noise = 0; for (int i = 0; i < numberOfOctaves; i++) { double k = 1 << i; noise += 1.0 / k * PerlinNoise.Compute(k * x, k * y, k * z); }
A noise value is computed as in Noise(Double, Double, Double) except that several noise functions with different frequencies (octaves) are added, for example for 3 octaves: noiseValue = Noise(x,y,z) + 1/2*Noise(2x, 2y, 2z) + 1/4*Noise(4x,4y,4z)