fn points_for_ring(i: i32, model: &Model) -> Line2 {
  let Model {
    max_radius,
    min_radius,
    n_rings,
    ..
  } = *model;
  let inner_radius = map_range(i, 0, n_rings, min_radius, max_radius);
  let start_degree = i * 20;
  let end_degree = start_degree + 330;
  (start_degree..end_degree)
    .map(point_mapper(inner_radius))
    .collect()
}
// generates a line suitable for a polygon defining a "ring"
generates a line suitable for a polygon defining a "ring"
generates a line suitable for a polygon defining a " ring "
fn points_for_ring(i: i32, model: &Model) -> Line2 {
  let Model {
    max_radius,
    min_radius,
    n_rings,
    ..
  } = *model;
  let inner_radius = map_range(i, 0, n_rings, min_radius, max_radius);
  let start_degree = i * 20;
  let end_degree = start_degree + 330;
  (start_degree..end_degree)
    .map(point_mapper(inner_radius))
    .collect()
}
fn points_for_ring ( i : i32 , model : & Model ) -> Line2 { let Model { max_radius , min_radius , n_rings , .. } = * model ; let inner_radius = map_range ( i , 0 , n_rings , min_radius , max_radius ) ; let start_degree = i * 20 ; let end_degree = start_degree + 330 ; ( start_degree .. end_degree ) . map ( point_mapper ( inner_radius ) ) . collect ( ) }
generates a line suitable for a polygon defining a "ring"
generates a line suitable for a polygon defining a " ring "
i
i32
model
&Model