diff options
-rw-r--r-- | src/fluid_simulator.adb | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/fluid_simulator.adb b/src/fluid_simulator.adb index 9d9186b..f36b834 100644 --- a/src/fluid_simulator.adb +++ b/src/fluid_simulator.adb @@ -84,10 +84,11 @@ procedure Fluid_Simulator is IO.Get_Immediate (Input); if Input = Latin.LF then X := 1.0; - Y := Y + 1.0; + Y := Y + 2.0; else if Input > Latin.Space and Input < Latin.DEL then Store.Append (Create (X, Y, (Input = '#'))); + Store.Append (Create (X, Y + 1.0, (Input = '#'))); end if; X := X + 1.0; end if; @@ -108,8 +109,8 @@ procedure Fluid_Simulator is for P of Input loop X := Integer (Fixed.Re (P.Place)); Y := Integer (Fixed.Im (P.Place)); - if X >= 0 and X <= 80 and Y >= 0 and Y <= 25 then - Grid (X, Y) := True; + if X >= 0 and X <= 80 and Y >= 0 and Y <= 50 then + Grid (X, Y / 2) := True; end if; end loop; for J in Integer range 1 .. 25 loop @@ -188,10 +189,10 @@ procedure Fluid_Simulator is Threshold : in Quantity) is begin for C in reverse Store.First_Index .. Store.Last_Index loop - if Fixed.Re (Store (C).Place) < 0.0 - Threshold or + if Fixed.Re (Store (C).Place) < 1.0 - Threshold or Fixed.Re (Store (C).Place) > 80.0 + Threshold or - Fixed.Im (Store (C).Place) < 0.0 - Threshold or - Fixed.Im (Store (C).Place) > 25.0 + Threshold + Fixed.Im (Store (C).Place) < 1.0 - Threshold or + Fixed.Im (Store (C).Place) > 50.0 + Threshold then Store.Delete (C); end if; |