ローレンツのカオス

0

// Dolittle + GNUPLOT(ローレンツのカオス)
data=array! create.
a=1.25. b=0.75.
x0=0.1. y0=0.0.
[
 x1=(1+a*b)*x0-b*x0*y0.
 y1=(1-b)*y0+b*(x0*x0).
 data! (""! (x1)(" ")(y1) concat) add.
 x0=x1. y0=y1.
]! (50000) repeat.
f=textfile! ((path)+"tmp.dat") create. f! (data) writeall.

fnm=random(9999).
source="
set terminal jpeg
set output '"+(fnm)+".jpg'
set xrange [-2.5:2.5]
plot 'tmp.dat' ps 0 lc rgb 'orange' title ' '
".

script=array! create.
f=textfile! ((path)+"tmp.txt") create. script! (source) add. f! (script) writeall.
rrt=system! ("/usr/local/bin/gnuplot "+(path)+"tmp.txt") execute.
turtle! create ((path)+(fnm)+".jpg") setshape (0.8)(1.0) scale.

Default