fn draw_contour(draw: &Draw, model: &Model, n: usize, contour: Vec<Line2>) {
  let hue = map_range(n, 0, model.n_contours - 1, 2.0, 30.0) / 360.0;
  let color = hsl(hue, 0.55, 0.52);
  for line in contour {
    // each line is just 2 points, even though that isn't necessarily obvious
    draw.line().color(color).start(line[0]).end(line[1]);
  }
}
// Simply draw all the lines for a given contour
Simply draw all the lines for a given contour
Simply draw all the lines for a given contour
fn draw_contour(draw: &Draw, model: &Model, n: usize, contour: Vec<Line2>) {
  let hue = map_range(n, 0, model.n_contours - 1, 2.0, 30.0) / 360.0;
  let color = hsl(hue, 0.55, 0.52);
  for line in contour {
    // each line is just 2 points, even though that isn't necessarily obvious
    draw.line().color(color).start(line[0]).end(line[1]);
  }
}
fn draw_contour ( draw : & Draw , model : & Model , n : usize , contour : Vec < Line2 > ) { let hue = map_range ( n , 0 , model . n_contours - 1 , 2.0 , 30.0 ) / 360.0 ; let color = hsl ( hue , 0.55 , 0.52 ) ; for line in contour { // each line is just 2 points, even though that isn't necessarily obvious draw . line ( ) . color ( color ) . start ( line [ 0 ] ) . end ( line [ 1 ] ) ; } }
Simply draw all the lines for a given contour
Simply draw all the lines for a given contour
draw
&Draw
model
&Model
n
usize
contour
Vec<Line2>