fn draw_shapes_layer2(draw: &Draw, model: &Model, win: &Rect) {
  let shapes = generate_shapes(model.n_polygons / 3, model.n_layers, win, PALETTE2.to_vec());

  let layers = 3;
  let cycles = model.n_layers / layers;
  for _ in 0..cycles {
    for (shape, color, center) in &shapes {
      if center.y > center.x {
        for __ in 0..layers {
          draw.polygon().color(*color).points(meander(&shape, 5, 0.5));
        }
      }
    }
  }
}
// same as draw_shapes_layer1 except only draw the shapes if the
// polygon center is above line y=x
same as draw_shapes_layer1 except only draw the shapes if the
polygon center is above line y=x
same as draw_shapes_layer1 except only draw the shapes if the polygon center is above line y = x
fn draw_shapes_layer2(draw: &Draw, model: &Model, win: &Rect) {
  let shapes = generate_shapes(model.n_polygons / 3, model.n_layers, win, PALETTE2.to_vec());
  let layers = 3;
  let cycles = model.n_layers / layers;
  for _ in 0..cycles {
    for (shape, color, center) in &shapes {
      if center.y > center.x {
        for __ in 0..layers {
          draw.polygon().color(*color).points(meander(&shape, 5, 0.5));
        }
      }
    }
  }
}
fn draw_shapes_layer2 ( draw : & Draw , model : & Model , win : & Rect ) { let shapes = generate_shapes ( model . n_polygons / 3 , model . n_layers , win , PALETTE2 . to_vec ( ) ) ; let layers = 3 ; let cycles = model . n_layers / layers ; for _ in 0 .. cycles { for ( shape , color , center ) in & shapes { if center . y > center . x { for __ in 0 .. layers { draw . polygon ( ) . color ( * color ) . points ( meander ( & shape , 5 , 0.5 ) ) ; } } } } }
same as draw_shapes_layer1 except only draw the shapes if the
polygon center is above line y=x
same as draw_shapes_layer1 except only draw the shapes if the polygon center is above line y = x
draw
&Draw
model
&Model
win
&Rect