#noise #perlin #simplex #random #seeded #graphics

nightly no-std noise_fn

Some simple noise functions and traits to allow easy integration with your own

4 releases

0.2.0 Jun 27, 2022
0.1.2 Sep 12, 2020
0.1.1 Sep 11, 2020
0.1.0 Sep 11, 2020

#936 in Math

MIT license

28KB
608 lines

noise_fn

Crate

Documentation

Repository

Changelog

Some simple noise functions and traits to allow easy integration with your own.

use noise_fn::{Seedable, NoiseDomain, Octaves, Simplex};
use sized_matrix::Vector;

let seed = 12345;

let octaves = Octaves::<_, 4>::new(Simplex::new(), 0.5, 0.5).seed(seed);

let value2D = octaves.noise(Vector::vector([1.2, -3.5]));
let value3D = octaves.noise(Vector::vector([1.2, -3.5, 2.8]));

To use this, add it as a dependency to your Cargo.toml:

[dependencies]
noise_fn = "^0.2.0"

lib.rs:

Some simple noise functions and traits to allow easy integration with your own.

use noise_fn::{Seedable, NoiseDomain, Octaves, Simplex};
use sized_matrix::Vector;

let seed = 12345;

let octaves = Octaves::<_, 4>::new(Simplex::new(), 0.5, 0.5).seed(seed);

let value2D = octaves.noise(Vector::vector([1.2, -3.5]));
let value3D = octaves.noise(Vector::vector([1.2, -3.5, 2.8]));

To use this, add it as a dependency to your Cargo.toml:

[dependencies]
noise_fn = "^0.2.0"

Dependencies

~390–520KB