fn points_for_ring(i: i32, model: &Model) -> Line2 {
  let Model {
    radius, n_rings, ..
  } = *model;
  let inner_radius = radius;
  let start_degree = map_range(i, 0, n_rings, 0, 360 - rad_to_deg(PI / 3.0) as i32);
  let end_degree = start_degree + rad_to_deg(PI / 3.0) as i32;
  let inner_points = (start_degree..end_degree)
    .map(point_mapper(i, inner_radius, model))
    .rev();
  inner_points.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 {
    radius, n_rings, ..
  } = *model;
  let inner_radius = radius;
  let start_degree = map_range(i, 0, n_rings, 0, 360 - rad_to_deg(PI / 3.0) as i32);
  let end_degree = start_degree + rad_to_deg(PI / 3.0) as i32;
  let inner_points = (start_degree..end_degree)
    .map(point_mapper(i, inner_radius, model))
    .rev();
  inner_points.collect()
}
fn points_for_ring ( i : i32 , model : & Model ) -> Line2 { let Model { radius , n_rings , .. } = * model ; let inner_radius = radius ; let start_degree = map_range ( i , 0 , n_rings , 0 , 360 - rad_to_deg ( PI / 3.0 ) as i32 ) ; let end_degree = start_degree + rad_to_deg ( PI / 3.0 ) as i32 ; let inner_points = ( start_degree .. end_degree ) . map ( point_mapper ( i , inner_radius , model ) ) . rev ( ) ; inner_points . 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