From 7506d4907f4d93871916b914a11166dca0bf8857 Mon Sep 17 00:00:00 2001 From: annieversary Date: Wed, 1 Sep 2021 20:00:54 +0200 Subject: [PATCH] m 11 --- crates/subtitled11/src/main.rs | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/crates/subtitled11/src/main.rs b/crates/subtitled11/src/main.rs index 41d19e7..67a757f 100644 --- a/crates/subtitled11/src/main.rs +++ b/crates/subtitled11/src/main.rs @@ -109,16 +109,20 @@ fn view(app: &App, model: &Model, frame: Frame) { // rotate let v = rot(t) * v; // project onto xz plane cause it's the coolest one - 100.0 * vec2(v.x, v.z) + 50.0 * vec2(v.x + v.y, v.z + v.w) }) .collect::>(); - // make all pairs of points - let p = p + + for (i, (&a, &b)) in p .iter() .enumerate() - .flat_map(|(i, a)| p[i + 1..].iter().map(move |b| (a, b))); - for (&a, &b) in p { - draw.line().points(a, b).color(BLACK); + // make all pairs of points + .flat_map(|(i, a)| p[i + 1..].iter().map(move |b| (a, b))) + .enumerate() + { + if i % 2 != 0 { + draw.line().points(a, b).color(BLACK); + } } draw.to_frame(app, &frame).unwrap();