#points #noise #1d #generate

cosiest_noisiest

cosiest_noisiest allows generating 1d noise at arbitrary points

2 releases

0.1.1 May 25, 2024
0.1.0 May 23, 2024

#3 in #1d

MIT/Apache

15KB
215 lines

Cosiest Noisiest

cosiest_noisiest allows generating 1d noise at arbitrary points

Usage

Add this to your Cargo.toml

[dependencies]
cosiest_noisiest = "0.1.0"

Examples

use cosiest_noisiest::NoiseGenerator;
let mut noise_generator = NoiseGenerator::from_u64_seed(2, 1. / 32., 128., 3);
let noise:f64 = noise_generator.sample(1024);
use cosiest_noisiest::NoiseGenerator;
let mut noise_generator = NoiseGenerator::from_u64_seed(2, 1. / 32., 128., 3);
let noise = [0.0;1024];
noise_generator.fill(noise);

Crate Features

f32 - Enables using f32 when interpolating between noise values instead of the default f64.


lib.rs:

Cosiest Noisiest

cosiest_noisiest allows generating 1d noise at arbitrary points

Examples

use cosiest_noisiest::*;

let mut noise_generator = NoiseGenerator::from_u64_seed(2, (1./32.).into(), 128., 3);
let noise:f64 = noise_generator.sample(1024);
use cosiest_noisiest::*;

let mut noise_generator = NoiseGenerator::from_u64_seed(2, Frequency::from_wave_length(32), 128., 3);
let mut noise= [0.0;1024];
noise_generator.fill(0,&mut noise);

Crate Features

f32 - Enables using f32 when interpolating between noise values instead of the default f64.

Dependencies

~1.4–2.2MB
~39K SLoC