A fast, seeded Simplex Noise implementation for the Carp programming language.
- Seeded Noise State: Independent noise generators that do not rely on global RNG state.
- 2D & 3D Simplex Noise: Implementation based on the canonical Simplex algorithms.
- Fractal Brownian Motion (FBM): Composable fractal noise with configurable octaves, persistence, and lacunarity.
- Performance: Uses unsafe array access for hot paths and avoids allocations during sampling.
Clone this repository into your project or add it as a submodule:
git submodule add https://github.com/sqrew/carp-noise.git(load "carp-noise/noise.carp")
(use Noise)
(defn main []
(let [state (make-noise 12345)
val (noise2d &state 0.5 0.5)]
(IO.println &(Double.to-string val))))
(let [state (make-noise 123)
config (FBMConfig.init 6 0.5 2.0)
val (fbm2d &state 0.1 0.2 &config)]
(IO.println &(Double.to-string val)))
Run the test suite with:
carp -x test/noise_test.carpThis project is licensed under the MIT License.