leaf-spread 0.1.2

A crate to iterate indefinitely over well spread points, similar to some leaf arrangement pattern in nature
Documentation
  • Coverage
  • 0%
    0 out of 3 items documented0 out of 1 items with examples
  • Size
  • Source code size: 5.42 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 1.05 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Links
  • Inspirateur/leaf-sample
    0 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • Inspirateur

leaf-sample

A Rust crate to iterate indefinitely over well spread points, similar to some leaf arrangement pattern in nature.

Applications

Ideal for generating a variable amount of distinct colors.

Grid sample Poisson Disk Leaf sample
Iterate indefinitely
Random Looking
Fast

Usage

use leaf_spread::leaf_sample;
use palette::Hsv;

fn main() {
  for [hue, value] in leaf_sample!(0..360, 0.6..1.0).take(10) {
    let color = Hsv::new(hue, 0.8, value);
    // use the color however
  }
}

How ?

Golden ratio shenaningans from http://extremelearning.com.au/unreasonable-effectiveness-of-quasirandom-sequences/