Home » Archimedes archive » Micro User » MU 1991-04.adf » Listings » Kam-1
Kam-1
This website contains an archive of files for the Acorn Electron, BBC Micro, Acorn Archimedes, Commodore 16 and Commodore 64 computers, which Dominic Ford has rescued from his private collection of floppy disks and cassettes.
Some of these files were originally commercial releases in the 1980s and 1990s, but they are now widely available online. I assume that copyright over them is no longer being asserted. If you own the copyright and would like files to be removed, please contact me.
Tape/disk: | Home » Archimedes archive » Micro User » MU 1991-04.adf » Listings |
Filename: | Kam-1 |
Read OK: | ✔ |
File size: | 023C bytes |
Load address: | 0000 |
Exec address: | 0000 |
File contents
10REM > <BasicSave$dir>.Kam-1 20PRINT"Strange Attractors 1" 30PRINT"The KAM attractor" 40PRINT"By Mike Cook" 50PRINT"A defines the Angle of the orbit in radians" 60REPEAT 70INPUT"Enter a value for A about (1.1 to 1.7) ",A 80MODE15 90PRINT TAB(0,0);"The KAM attractor By Mike Cook" 100sinA=SIN(A) 110cosA=COS(A) 120C%=0 130FOR orbit= 0.1 TO 2.5 STEP 0.05 140C%=C%+1 150GCOL 0,C% 160U=orbit/3 170V=orbit/3 180FOR B%= 1 TO 300 190IF ABS(U)>1E6 OR ABS(V)>1E6 THEN GOTO 240 200PLOT 69,(U*640)+640,(V*512)+512 210X=U*cosA-(V-U*U)*sinA 220Y=U*sinA+(V-U*U)*cosA 230U=X:V=Y 240NEXT 250NEXT 260PRINT TAB(0,0)"This is A = ";A;SPC(18) 270PRINT TAB(0,31); 280UNTIL FALSE
� > <BasicSave$dir>.Kam-1 �"Strange Attractors 1" �"The KAM attractor" (�"By Mike Cook" 22�"A defines the Angle of the orbit in radians" <� F0�"Enter a value for A about (1.1 to 1.7) ",A P�15 Z,� �0,0);"The KAM attractor By Mike Cook" d sinA=�(A) n cosA=�(A) xC%=0 �� orbit= 0.1 � 2.5 � 0.05 �C%=C%+1 � � 0,C% � U=orbit/3 � V=orbit/3 �� B%= 1 � 300 �"� �(U)>1E6 � �(V)>1E6 � � �dp@ � � 69,(U*640)+640,(V*512)+512 �X=U*cosA-(V-U*U)*sinA �Y=U*sinA+(V-U*U)*cosA �U=X:V=Y �� �� !� �0,0)"This is A = ";A;�(18) � �0,31); � � �
00000000 0d 00 0a 1d f4 20 3e 20 3c 42 61 73 69 63 53 61 |..... > <BasicSa| 00000010 76 65 24 64 69 72 3e 2e 4b 61 6d 2d 31 0d 00 14 |ve$dir>.Kam-1...| 00000020 1b f1 22 53 74 72 61 6e 67 65 20 41 74 74 72 61 |.."Strange Attra| 00000030 63 74 6f 72 73 20 31 22 0d 00 1e 18 f1 22 54 68 |ctors 1"....."Th| 00000040 65 20 4b 41 4d 20 61 74 74 72 61 63 74 6f 72 22 |e KAM attractor"| 00000050 0d 00 28 13 f1 22 42 79 20 4d 69 6b 65 20 43 6f |..(.."By Mike Co| 00000060 6f 6b 22 0d 00 32 32 f1 22 41 20 64 65 66 69 6e |ok"..22."A defin| 00000070 65 73 20 74 68 65 20 41 6e 67 6c 65 20 6f 66 20 |es the Angle of | 00000080 74 68 65 20 6f 72 62 69 74 20 69 6e 20 72 61 64 |the orbit in rad| 00000090 69 61 6e 73 22 0d 00 3c 05 f5 0d 00 46 30 e8 22 |ians"..<....F0."| 000000a0 45 6e 74 65 72 20 61 20 76 61 6c 75 65 20 66 6f |Enter a value fo| 000000b0 72 20 41 20 61 62 6f 75 74 20 28 31 2e 31 20 74 |r A about (1.1 t| 000000c0 6f 20 31 2e 37 29 20 22 2c 41 0d 00 50 07 eb 31 |o 1.7) ",A..P..1| 000000d0 35 0d 00 5a 2c f1 20 8a 30 2c 30 29 3b 22 54 68 |5..Z,. .0,0);"Th| 000000e0 65 20 4b 41 4d 20 61 74 74 72 61 63 74 6f 72 20 |e KAM attractor | 000000f0 42 79 20 4d 69 6b 65 20 43 6f 6f 6b 22 0d 00 64 |By Mike Cook"..d| 00000100 0d 73 69 6e 41 3d b5 28 41 29 0d 00 6e 0d 63 6f |.sinA=.(A)..n.co| 00000110 73 41 3d 9b 28 41 29 0d 00 78 08 43 25 3d 30 0d |sA=.(A)..x.C%=0.| 00000120 00 82 1d e3 20 6f 72 62 69 74 3d 20 30 2e 31 20 |.... orbit= 0.1 | 00000130 b8 20 32 2e 35 20 88 20 30 2e 30 35 0d 00 8c 0b |. 2.5 . 0.05....| 00000140 43 25 3d 43 25 2b 31 0d 00 96 0a e6 20 30 2c 43 |C%=C%+1..... 0,C| 00000150 25 0d 00 a0 0d 55 3d 6f 72 62 69 74 2f 33 0d 00 |%....U=orbit/3..| 00000160 aa 0d 56 3d 6f 72 62 69 74 2f 33 0d 00 b4 11 e3 |..V=orbit/3.....| 00000170 20 42 25 3d 20 31 20 b8 20 33 30 30 0d 00 be 22 | B%= 1 . 300..."| 00000180 e7 20 94 28 55 29 3e 31 45 36 20 84 20 94 28 56 |. .(U)>1E6 . .(V| 00000190 29 3e 31 45 36 20 8c 20 e5 20 8d 64 70 40 0d 00 |)>1E6 . . .dp@..| 000001a0 c8 20 f0 20 36 39 2c 28 55 2a 36 34 30 29 2b 36 |. . 69,(U*640)+6| 000001b0 34 30 2c 28 56 2a 35 31 32 29 2b 35 31 32 0d 00 |40,(V*512)+512..| 000001c0 d2 19 58 3d 55 2a 63 6f 73 41 2d 28 56 2d 55 2a |..X=U*cosA-(V-U*| 000001d0 55 29 2a 73 69 6e 41 0d 00 dc 19 59 3d 55 2a 73 |U)*sinA....Y=U*s| 000001e0 69 6e 41 2b 28 56 2d 55 2a 55 29 2a 63 6f 73 41 |inA+(V-U*U)*cosA| 000001f0 0d 00 e6 0b 55 3d 58 3a 56 3d 59 0d 00 f0 05 ed |....U=X:V=Y.....| 00000200 0d 00 fa 05 ed 0d 01 04 21 f1 20 8a 30 2c 30 29 |........!. .0,0)| 00000210 22 54 68 69 73 20 69 73 20 41 20 3d 20 22 3b 41 |"This is A = ";A| 00000220 3b 89 28 31 38 29 0d 01 0e 0d f1 20 8a 30 2c 33 |;.(18)..... .0,3| 00000230 31 29 3b 0d 01 18 07 fd 20 a3 0d ff |1);..... ...| 0000023c