Implement a BH-curve material (example material is 3R1)

NB: I think there are some errors needing to be worked out, but at least
it doesn't crash!
This commit is contained in:
2020-08-27 23:41:57 -07:00
parent b25ccc2471
commit aff8764114
6 changed files with 289 additions and 60 deletions

View File

@@ -50,14 +50,14 @@ impl ColorTermRenderer {
let cell = state.get(x, y);
//let r = norm_color(cell.bz() * consts::C);
//let r = 0;
let r = norm_color(cell.mat().mz());
let r = norm_color(cell.mat().mz()*1.0e-2);
let b = (55.0*cell.mat().conductivity()).min(255.0) as u8;
//let b = 0;
//let b = norm_color(cell.ey());
//let g = 0;
//let g = norm_color(cell.ex());
//let g = norm_color(curl(cell.ex(), cell.ey()));
let g = norm_color((cell.bz() * 3.0e8).into());
let g = norm_color((cell.bz() * 1.0e4).into());
//let g = norm_color(cell.ey().into());
write!(&mut buf, "{}", RGB(r, g, b).paint(square));
}