Color legend plain property method
Several octaves of gradient noise, each finer and fainter than the one before, summed to a value from −1 to 1 (fractal Brownian motion).
A sealed class, immutable and thread-safe. The noise page shows it in context, with code.
Names are colored by what they are: a property or a method; values and fields keep the plain color.
Properties
Seed →
ulong · Read-only. The seed the noise was created with. Octave i is a GradientNoise seeded with StableHash.Combine(Seed, i), shifted by a fraction of a cell.
Settings →
FractalSettings · Read-only. The settings the noise was created with.
Fields
MaxOctaves →
int · Constant. 16, the most octaves a noise can have.
Methods
FractalNoise() →
FractalNoise(ulong seed) · Creates the noise of the seed with FractalSettings.Default: four octaves, features about 32 units across.
| Parameter | Type | Description |
|---|---|---|
seed |
ulong |
Any value. Different seeds give unrelated fields. |
FractalNoise(ulong seed, FractalSettings settings) · Creates the noise of the seed with those settings. Throws ArgumentNullException for null settings, and ArgumentOutOfRangeException for a frequency, lacunarity or gain that isn’t a finite number above 0, or for octaves outside 1 to MaxOctaves.
| Parameter | Type | Description |
|---|---|---|
seed |
ulong |
Any value. Different seeds give unrelated fields. |
settings |
FractalSettings |
The frequency, octaves, lacunarity and gain. |
Sample() →
Sample(double x, double y) · The noise at the point, from −1 to 1; most values are much closer to 0, see the range in practice. The same point gives the same value on every machine. Throws ArgumentOutOfRangeException for a coordinate that is NaN or infinite, or that the highest octave would sample beyond GradientNoise.MaxCoordinate.
| Parameter | Type | Description |
|---|---|---|
x |
double |
The x coordinate, in world units. |
y |
double |
The y coordinate, in world units. |