From 79250893089506a4ddfcb297d0e474c60c153512 Mon Sep 17 00:00:00 2001 From: Juergen Stuber Date: Sun, 22 Oct 2023 10:30:09 +0200 Subject: [PATCH] Decrease the time step to avoid gaps Keep the same speed by increasing the default number of time steps per frame. --- src/bin/lorenz/main.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/bin/lorenz/main.rs b/src/bin/lorenz/main.rs index 68e0743..68718e7 100644 --- a/src/bin/lorenz/main.rs +++ b/src/bin/lorenz/main.rs @@ -18,7 +18,7 @@ fn send(w: &mut T, f: &Frame) -> std::io::Result<()> { w.flush() } -const DEFAULT_ARG: usize = 10; +const DEFAULT_ARG: usize = 20; fn main() -> std::io::Result<()> { let args = args().collect::>(); eprintln!("executing {}", args[0]); @@ -44,14 +44,14 @@ fn main() -> std::io::Result<()> { let x0 = (x_size as f64) / 2.0; let y0 = (y_size as f64) / 2.0; - // x = [-20.0,20.0], z = [0.0,50.0] + // x in [-20.0,20.0], z in [0.0,50.0] let xc = 0.0; let zc = 25.0; let x_scale = x0 / 20.0; let z_scale = y0 / 25.0; - let dt = 0.005; + let dt = 0.0025; let a = 10.0; let b = 27.0; let c = 8.0 / 3.0;