Broken because there seems to be a scaling issue, and also the previous 1d simulation has no effect when ported to this new 2d world.
20 lines
544 B
Rust
20 lines
544 B
Rust
use coremem::SimState;
|
|
use coremem::render::NumericTermRenderer;
|
|
use coremem::consts;
|
|
use std::{thread, time};
|
|
|
|
fn main() {
|
|
let mut state = SimState::new(16, 4);
|
|
state.impulse_bz(0, 0, 1.0/consts::C);
|
|
//state.impulse_ey(0, 0, 1.0);
|
|
state.impulse_bz(7, 0, 1.0/consts::C);
|
|
//state.impulse_ey(7, 0, 1.0);
|
|
state.impulse_bz(15, 0, 1.0/consts::C);
|
|
//state.impulse_ey(15, 0, 1.0);
|
|
loop {
|
|
NumericTermRenderer.render(&state);
|
|
state.step();
|
|
thread::sleep(time::Duration::from_millis(100));
|
|
}
|
|
}
|