Skip to content

Calling this library

pmodl edited this page Apr 14, 2018 · 2 revisions
extern crate domain_coloring;
extern crate num_complex;

use domain_coloring::{*,LightnessAlg::*};

fn main() {
    let imgdesc = ImageDesc { width: 1280, height: 800, xres: 0.005, yres: 0.005 };
    let myfunc = (|z| z * ( z  - 1.0) / (1.0 + z));
    domain_color_simple(&imgdesc, &myfunc, &"path/to/image.png");

    let repeat = (|z: Complex64| z.norm_sqr().ln(z));
    domain_color(&imgdesc, &myfunc, &"path/to/image.png", Exp2, &Some(&repeat));
}
Clone this wiki locally