Crates.io | spherical_blue_noise |
lib.rs | spherical_blue_noise |
version | 0.1.1 |
source | src |
created_at | 2021-01-20 00:00:44.58507 |
updated_at | 2021-01-20 02:02:53.706756 |
description | Blue noise generator on a sphere. |
homepage | |
repository | https://github.com/nouvadam/spherical-blue-noise/ |
max_upload_size | |
id | 344198 |
size | 40,621 |
Library for generating points with blue noise distribution on a unit sphere.
The underlying idea for this algorithm is:
Hence, the time complexity of this algorithm is O(N^2), where N is the number of points. (could be made faster by using octree, like in barnes-hut algorithm)
Code for this animation is available in the examples
folder.
use spherical_blue_noise::*;
let blue_noise_vec: Vec<(f32, f32, f32)> = BlueNoiseSphere::new(16, &mut rand::thread_rng()).into_iter().collect();
println!("{:?}", blue_noise_vec);
The basic idea is based on the paper:
Wong, Kin-Ming and Wong, Tien-Tsin. "Spherical Blue Noise", Pacific Graphics Short Papers, 2018, link