#noise #poisson #blue-noise #graphics

bluenoise_sampler

Precomputed blue noise for fast sampling

1 unstable release

Uses new Rust 2024

0.1.0 Feb 22, 2025

#746 in Algorithms

Download history 117/week @ 2025-02-19 31/week @ 2025-02-26

148 downloads per month

MIT/Apache

27KB
852 lines

Precomputed blue noise for fast sampling

This crate provides precomputed blue noise for fast sampling. The blue noise is generated with the bluenoise crate and is stored in an array for later use.

Scaling

The blue noise can be scaled based on a desired radius. The radius is the distance between each sample, just like in a regular Poisson disk sampling algorithm.

Example

use bluenoise_sampler::BlueNoiseSampler;

let noise_sampler = BlueNoiseSampler::new(512.0, 256.0, 4.0);
let samples = noise_sampler.get_samples(); // Returns Vec<(f32, f32)>

lib.rs:

Precomputed blue noise for fast sampling

This crate provides precomputed blue noise for fast sampling. The blue noise is generated with the bluenoise crate and is stored in an array for later use.

Scaling

The blue noise can be scaled based on a desired radius. The radius is the distance between each sample, just like in a regular Poisson disk sampling algorithm.

Example

use bluenoise_sampler::BlueNoiseSampler;

let noise_sampler = BlueNoiseSampler::new(512.0, 256.0, 4.0);
let samples = noise_sampler.get_samples(); // Returns Vec<(f32, f32)>

Dependencies

~1.5MB
~25K SLoC