fn point_mapper(radius: f32, seed: f64) -> impl Fn(i32) -> Point2 {
  move |deg| {
    let angle = deg_to_rad(deg as f32);
    let x = angle.cos() * radius;
    let y = angle.sin() * radius;
    // commenting out the noise generation because it doesn't really add a lot.
    // I was going for a "hand drawn" look, which it kind of worked but wasn't really appropriate for this design
    // let fbm = Fbm::new();
    // let x = x + fbm.get([x as f64, x as f64, seed]) as f32 * 5.0;
    // let y = y + fbm.get([y as f64, y as f64, seed]) as f32 * 5.0;
    pt2(x, y)
  }
}
// returns a closure suitable for a `map` function too convert degrees to points
returns a closure suitable for a `map` function too convert degrees to points
returns a closure suitable for a ` map ` function too convert degrees to points
fn point_mapper(radius: f32, seed: f64) -> impl Fn(i32) -> Point2 {
  move |deg| {
    let angle = deg_to_rad(deg as f32);
    let x = angle.cos() * radius;
    let y = angle.sin() * radius;
    // commenting out the noise generation because it doesn't really add a lot.
    // I was going for a "hand drawn" look, which it kind of worked but wasn't really appropriate for this design
    // let fbm = Fbm::new();
    // let x = x + fbm.get([x as f64, x as f64, seed]) as f32 * 5.0;
    // let y = y + fbm.get([y as f64, y as f64, seed]) as f32 * 5.0;
    pt2(x, y)
  }
}
fn point_mapper ( radius : f32 , seed : f64 ) -> impl Fn ( i32 ) -> Point2 { move | deg | { let angle = deg_to_rad ( deg as f32 ) ; let x = angle . cos ( ) * radius ; let y = angle . sin ( ) * radius ; // commenting out the noise generation because it doesn't really add a lot. // I was going for a "hand drawn" look, which it kind of worked but wasn't really appropriate for this design // let fbm = Fbm::new(); // let x = x + fbm.get([x as f64, x as f64, seed]) as f32 * 5.0; // let y = y + fbm.get([y as f64, y as f64, seed]) as f32 * 5.0; pt2 ( x , y ) } }
returns a closure suitable for a `map` function too convert degrees to points
returns a closure suitable for a ` map ` function too convert degrees to points
radius
f32
seed
f64