- mugen Museum
- 6F COBOL CG コレクション
- 2枚の翼のカオス
2枚の翼のカオス
program-id. chaos03.
data division.
working-storage section.
01 i pic 9(6).
01 a pic s9v999999.
01 b pic s9v999999.
01 x0 comp-2.
01 x1 comp-2.
01 y0 comp-2.
01 y1 comp-2.
01 ad pic x(20).
procedure division.
display 'Chaos03 2mai no tsubasa' upon syserr
display 'a=' upon syserr no advancing accept ad compute a = function numval(ad)
display 'b=' upon syserr no advancing accept ad compute b = function numval(ad)
compute x0 = 0.1 compute y0 = 0
perform varying i from 1 by 1 until i > 50000
compute x1 = y0 + a * x0 + (5 * x0 ** 2) / (1 + x0 ** 2) + 1 - 0.2 * function exp(-y0 ** 2)
compute y1 = -b * x0 + 5 * (-1 ** i)
display x1 ' ' y1
compute x0 = x1 compute y0 = y1
end-perform
exit program.
gnuplot -p -e "set title 'a=0.02 b=0.98'; plot 'tmp' ps 0 lt rgb 'red'"
x,y の値を音にマッピングさせて演奏させたアルバムです。
Listen Attractor II
https://yamazawa.bandcamp.com/album/attractor-ii