Click or drag to resize
DigitalRunePerlinNoiseNoise Method (Double, Double, Double, Int32)

Note: This API is now obsolete.

Computes a 3d noise value for a 3d position given by (x, y, z).

Namespace: DigitalRune.Mathematics.Statistics
Assembly: DigitalRune.Mathematics (in DigitalRune.Mathematics.dll) Version: 1.14.0.0 (1.14.0.14427)
Syntax
[ObsoleteAttribute("This method is obsolete. See remarks.")]
public static double Noise(
	double x,
	double y,
	double z,
	int numberOfOctaves
)

Parameters

x
Type: SystemDouble
The x position.
y
Type: SystemDouble
The y position.
z
Type: SystemDouble
The z position.
numberOfOctaves
Type: SystemInt32
The number of octaves.

Return Value

Type: Double
The 3d noise value for the given position (x, y, z).
Exceptions
ExceptionCondition
ArgumentOutOfRangeExceptionnumberOfOctaves is negative or 0.
Remarks

This method is obsolete. It is recommended to manually combine noise generated by the PerlinNoise.Compute methods as required. For example: .

C#
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)

See Also