API Reference › Noise › Noise.simplex2
method

Noise.simplex2

Noise.simplex2(x, y, seed) -> fixed

Samples 2D **simplex noise** at (x, y) for the given seed and returns a fixed in [-1, 1]. Simplex noise sums contributions from the three corners of a skewed triangular cell, which gives it fewer of the axis-aligned directional artifacts that gradient noise can show — making it the recommended default for organic fields like terrain height and biome masks.

Deterministic in fixed point across platforms and runs, and the generator that Noise.fbm2 layers by default. Scale the coordinates to set feature size.

Parameters

seedthe field selector

Example

program Simplex {
  entry {
    let seed = 1337
    let n = Noise.simplex2(fixed(4) / fixed(9), fixed(6) / fixed(9), seed)
    print(Math.floor(Noise.unit(n) * fixed(100)))
  }
}
← All symbols