\ Lorenz Equation - Simulating Chaos \ Equations: dx/dt = a(y - x) dy/dt = bx - xz - y dz/dt = xy - cz fl \ save file in eeprom fswrite lorenz.f : (LORENZ) ; decimal \ Multiplier redefined to allow overfow. : MULTX Y() swap Y() Y0 */ TO swap Y() ; 16 NODES MODEL: LORENZ 4 7 RK2 5 4 INV 6 5 8 SUM 1 Kx 7 6 POT 8 13 RK2 2 Kx 9 4 POT 10 4 8 MULTX 11 4 14 MULTX 12 8 9 11 SUM 13 12 INV 14 16 RK2 3 Kx 15 14 POT 16 10 15 SUM ; sc \ All parameters are set t0 produce the "butterfly". See Sept & Oct issues of \ Elektor for a discussion of the CHAOS Machine. 3000000 4 15000000 8 1000000 14 ASSIGN-IC \ x - 4 y - 8 z - 14 100000 TO 1 Kx \ a - Prandtl Number -280000 TO 2 Kx \ b - Raleigh Number -26667 TO 3 Kx \ c - Proportion 5 TO DT 20 TO COMINT OUTPUT-IS (display) 14 8 4 OUT-NODES SIMULATE LORENZ ... { Requirements for plotting Lorenz equation solutions. Execute the following words after loading lorenz.f. OUTPUT-IS (xyplot) 30 Y0 * TO Yx \ Yx scales output data for plotting 1 TO 1 N() \ y-axis 2 TO 2 N() \ x-axi \ set plot screen dimensions 75 TO YSCALE 75 TO YLEVEL 60 TO XSCALE 60 TO XLEVEL 1000 PRUN \ then press F4 to open xy-plot screen \ press F7 to stop plot before run is copmleted if desired }