1
0
mirror of https://github.com/PDP-10/its.git synced 2026-01-13 15:27:28 +00:00

Lorenz attractor on the 340 display.

This commit is contained in:
Lars Brinkhoff 2020-01-17 10:05:34 +01:00
parent 3fc269272b
commit 9f32ec0827
3 changed files with 88 additions and 0 deletions

View File

@ -613,6 +613,11 @@ expect ":KILL"
respond "*" ":midas lars; ts minsky_minsky tron\r"
expect ":KILL"
# Edward Lorenz' strange attactor.
respond "*" ":midas dsk0: lars; ts lorenz_lorenz\r"
expect ":KILL"
respond "*" ":link dsk0: .; @ lorenz, lars; ts lorenz\r"
# PI
respond "*" ":midas sys3;ts pi_rwg; ran\r"
expect ":KILL"

View File

@ -186,6 +186,7 @@
- LOCK, shut down system.
- LOGO, BBN Logo.
- LOOKUP, looks up user info in INQUIR database.
- LORENZ, Edward Lorenz' strange attractor.
- LOSS (device).
- LOTCLN - LOGOUT TIMES cleanup program.
- LSPEED, set TTY line parameters.

82
src/lars/lorenz.67 Normal file
View File

@ -0,0 +1,82 @@
title Lorenz - strange attractor
x=1
y=2
z=3
dx=4
dy=5
dz=6
dot=7
t=10
tt=t+1
dis==130
rho==28.0
sigma==10.0
beta==2.66666666666666666
loc 20
step: 0.0001
loc 41
jrst nts
loc 100
define display data ;Send data to display when ready.
conso dis,200
jrst .-1
datao dis,data
termin
define fix a,b ;Convert float in a to fixed point in a+1,
muli a,400 ;shifted by b.
tsc a,a
ash a+1,-243+19.!b(a)
termin
go: seto x,
.iotlsr x,
nts: cono dis,100
display <[020016]> ;Parameters, go to point mode.
move x,[1.0]
move y,[1.0]
move z,[1.0]
move dot,[220000,,022000]
loop: move dy,[rho] ;dy/dt = (rho-z)*x - y
fsb dy,z
fmp dy,x
fsb dy,y
move dx,y ;dx/dt = (y-x) * sigma
fsb dx,x
fmp dx,[sigma]
move dz,x ;dz/dt = x*y - beta*z
fmp dz,y
move t,z
fmp t,[beta]
fsb dz,t
fmp dx,step ;Update x,y,z from differentials.
fmp dy,step
fmp dz,step
fad x,dx
fad y,dy
fad z,dz
move t,x ;Convert x,y to fixed point.
fix t,-15.
addi tt,512.
dpb tt,[001200,,dot]
move t,y
fix t,-15.
addi tt,512.
dpb tt,[221200,,dot]
display dot ;And plot on display.
jrst loop
end go