Model the H/B field in 3d, mostly

This commit is contained in:
2020-09-17 22:53:12 -07:00
parent 54b23a0494
commit a1f5b96ae1
5 changed files with 68 additions and 92 deletions

View File

@@ -81,9 +81,9 @@ impl<'a> RenderSteps<'a> {
for y in 0..h {
for x in 0..w {
let cell = self.sim.get(x, y);
let r = scale_signed_to_u8(cell.mat().mz(), 100.0);
let r = scale_signed_to_u8(cell.mat().m().z(), 100.0);
let b = scale_unsigned_to_u8(cell.mat().conductivity(), 10.0);
let g = scale_signed_to_u8(cell.bz(), 1.0e-4);
let g = scale_signed_to_u8(cell.b().z(), 1.0e-4);
self.im.put_pixel(x, y, Rgb([r, g, b]));
}
}