fn red_blobs(win: &Rect, draw: &Draw) {
  for _i in 0..3000 {
    let hue = nextf(350., 399.) / 360.;
    let sat = nextf(0.4, 0.8);
    let lightness = nextf(0.25, 0.48);
    let alpha = nextf(0.04, 0.07);
    let height = nextf(2.0, 5.0);
    let width = nextf(height, height * 2.5);
    let x = Interp::reverse_exp(50., win.x.end + 10., random_f32());
    let y = (x / 75.).sin() * 50. + 175.;
    let y_spread = lerp(0.01, 0.5, x / win.x.end);
    let y = nextf(y * (1. - y_spread), y * (1. + y_spread));
    Blob::new()
      .x_y(x, y)
      .width(width)
      .height(height)
      .rotate_rad(nextf(0., PI * 2.))
      .noise_scale(nextf(0.4, 0.8))
      .hsla(hue, sat, lightness, alpha)
      .fuzziness(nextf(2., 4.))
      .draw(&draw);
  }

  for _i in 0..3000 {
    let hue = nextf(4., 40.) / 360.;
    let sat = nextf(0.4, 0.6);
    let lightness = nextf(0.45, 0.58);
    let alpha = nextf(0.04, 0.07);
    let height = nextf(2.0, 5.0);
    let width = nextf(height, height * 2.5);
    let x = lerp(win.x.start - 10., win.x.middle() - 50., random_f32());
    let y = (x / 95.).sin() * 40. + 375.;
    let y_spread = lerp(0.01, 0.5, x / win.x.end);
    let y = nextf(y * (1. - y_spread), y * (1. + y_spread));
    Blob::new()
      .x_y(x, y)
      .width(width)
      .height(height)
      .rotate_rad(nextf(0., PI * 2.))
      .noise_scale(nextf(0.4, 0.8))
      .hsla(hue, sat, lightness, alpha)
      .fuzziness(nextf(2., 4.))
      .draw(&draw);
  }
}
// draw a bunch of red blobs in wavy pattern
draw a bunch of red blobs in wavy pattern
draw a bunch of red blobs in wavy pattern
fn red_blobs(win: &Rect, draw: &Draw) {
  for _i in 0..3000 {
    let hue = nextf(350., 399.) / 360.;
    let sat = nextf(0.4, 0.8);
    let lightness = nextf(0.25, 0.48);
    let alpha = nextf(0.04, 0.07);
    let height = nextf(2.0, 5.0);
    let width = nextf(height, height * 2.5);
    let x = Interp::reverse_exp(50., win.x.end + 10., random_f32());
    let y = (x / 75.).sin() * 50. + 175.;
    let y_spread = lerp(0.01, 0.5, x / win.x.end);
    let y = nextf(y * (1. - y_spread), y * (1. + y_spread));
    Blob::new()
      .x_y(x, y)
      .width(width)
      .height(height)
      .rotate_rad(nextf(0., PI * 2.))
      .noise_scale(nextf(0.4, 0.8))
      .hsla(hue, sat, lightness, alpha)
      .fuzziness(nextf(2., 4.))
      .draw(&draw);
  }
  for _i in 0..3000 {
    let hue = nextf(4., 40.) / 360.;
    let sat = nextf(0.4, 0.6);
    let lightness = nextf(0.45, 0.58);
    let alpha = nextf(0.04, 0.07);
    let height = nextf(2.0, 5.0);
    let width = nextf(height, height * 2.5);
    let x = lerp(win.x.start - 10., win.x.middle() - 50., random_f32());
    let y = (x / 95.).sin() * 40. + 375.;
    let y_spread = lerp(0.01, 0.5, x / win.x.end);
    let y = nextf(y * (1. - y_spread), y * (1. + y_spread));
    Blob::new()
      .x_y(x, y)
      .width(width)
      .height(height)
      .rotate_rad(nextf(0., PI * 2.))
      .noise_scale(nextf(0.4, 0.8))
      .hsla(hue, sat, lightness, alpha)
      .fuzziness(nextf(2., 4.))
      .draw(&draw);
  }
}
fn red_blobs ( win : & Rect , draw : & Draw ) { for _i in 0 .. 3000 { let hue = nextf ( 350. , 399. ) / 360. ; let sat = nextf ( 0.4 , 0.8 ) ; let lightness = nextf ( 0.25 , 0.48 ) ; let alpha = nextf ( 0.04 , 0.07 ) ; let height = nextf ( 2.0 , 5.0 ) ; let width = nextf ( height , height * 2.5 ) ; let x = Interp :: reverse_exp ( 50. , win . x . end + 10. , random_f32 ( ) ) ; let y = ( x / 75. ) . sin ( ) * 50. + 175. ; let y_spread = lerp ( 0.01 , 0.5 , x / win . x . end ) ; let y = nextf ( y * ( 1. - y_spread ) , y * ( 1. + y_spread ) ) ; Blob :: new ( ) . x_y ( x , y ) . width ( width ) . height ( height ) . rotate_rad ( nextf ( 0. , PI * 2. ) ) . noise_scale ( nextf ( 0.4 , 0.8 ) ) . hsla ( hue , sat , lightness , alpha ) . fuzziness ( nextf ( 2. , 4. ) ) . draw ( & draw ) ; } for _i in 0 .. 3000 { let hue = nextf ( 4. , 40. ) / 360. ; let sat = nextf ( 0.4 , 0.6 ) ; let lightness = nextf ( 0.45 , 0.58 ) ; let alpha = nextf ( 0.04 , 0.07 ) ; let height = nextf ( 2.0 , 5.0 ) ; let width = nextf ( height , height * 2.5 ) ; let x = lerp ( win . x . start - 10. , win . x . middle ( ) - 50. , random_f32 ( ) ) ; let y = ( x / 95. ) . sin ( ) * 40. + 375. ; let y_spread = lerp ( 0.01 , 0.5 , x / win . x . end ) ; let y = nextf ( y * ( 1. - y_spread ) , y * ( 1. + y_spread ) ) ; Blob :: new ( ) . x_y ( x , y ) . width ( width ) . height ( height ) . rotate_rad ( nextf ( 0. , PI * 2. ) ) . noise_scale ( nextf ( 0.4 , 0.8 ) ) . hsla ( hue , sat , lightness , alpha ) . fuzziness ( nextf ( 2. , 4. ) ) . draw ( & draw ) ; } }
draw a bunch of red blobs in wavy pattern
draw a bunch of red blobs in wavy pattern
win
&Rect
draw
&Draw