Home » Archimedes archive » Acorn User » AU 1993-06.adf » !StarInfo_StarInfo » Mira

Mira

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 » Acorn User » AU 1993-06.adf » !StarInfo_StarInfo
Filename: Mira
Read OK:
File size: 06E1 bytes
Load address: 0000
Exec address: 0000
File contents
   10REM     >Mira (Info9)
   20REM By  John Williams
   30REM For all machines
   40REM (c) BAU June 1993
   50:
   60mode=12 : REM 20 for multiscan monitors, 2 for 8-bit machines
   70:
   80MODE 0
   90PROCread_data
  100eg=FNchoose
  110MODE mode
  120VDU 23;8202;0;0;0;0;
  130PROCplot(eg)
  140END
  150:
  160DEF PROCread_data
  170READ gs
  180DIM g$(gs),f$(gs)
  190FOR i=1 TO gs
  200 READ g$(i),f$(i)
  210NEXT
  220READ egs
  230DIM eg$(egs),g(i),A(egs),B(egs),X(egs),Y(egs),x0(egs),y0(egs),sc(egs)
  240FOR i=1 TO egs
  250 READ eg$(i),g(i),A(i),B(i),X(i),Y(i),x0(i),y0(i),sc(i)
  260NEXT
  270ENDPROC
  280:
  290DEF FNchoose
  300PRINTTAB(3);"Example";TAB(15);"G-function";TAB(35);"A";TAB(45);"B";TAB(55);"x(0) y(0) xc   yc   size"'
  310FOR i=1 TO egs
  320 PRINT;i;") ";eg$(i);TAB(15);g$(g(i));TAB(35);A(i);TAB(45);B(i);TAB(55);X(i);TAB(60);Y(i);TAB(65);x0(i);TAB(70);y0(i);TAB(75);sc(i)
  330NEXT
  340PRINT '"Choose:";
  350REPEAT
  360 key=GET-48
  370UNTIL key>0  AND key<=egs
  380=key
  390:
  400DEF PROCplot(eg)
  410CLS
  420A=A(eg):B=B(eg):x=X(eg):y=Y(eg):s=sc(eg):g$=f$(g(eg))
  430VDU 29,x0(eg);y0(eg);
  440f=(1-A)*x+2*A*(1-EVALg$)
  450FOR i=0 TO 13000
  460 IF i>100 GCOL 0,INT(i/3000)+1:PLOT 69,x*s,y*s
  470 z=x
  480 x=f+B*y
  490 f=(1-A)*x+2*A*(1-EVALg$)
  500 y=f-z
  510NEXT
  520ENDPROC
  530:
  540REM G functions:
  550DATA 8
  560DATA "1 � (1+x�)","1/(1+x*x)"
  570DATA "x � (1+x�)","x/(1+x*x)"
  580DATA "1 � �(1+x�)","1/SQR(1+x*x)"
  590DATA "sin x � (1+x�)","SINx/(1+x*x)"
  600DATA "x � (1+sgn x.x�)","x/(1+SGNx*x^3)"
  610DATA "x� � (1+sgn x.x�)","x*x/(1+x^3*SGNx)"
  620DATA "x.e[-abs x]","x*EXP(-ABSx)"
  630DATA "x.sin x.e[-abs x]","x*SINx*EXP(-ABSx)"
  640:
  650REM Examples:
  660DATA 8
  670DATA Bow,     4,1.49,1,      5, 0,550,550,30
  680DATA Toy,     1,0.69,1,     12, 0,600,500,15
  690DATA Petals,  5,0.77,1,      3, 7,550,550,30
  700DATA Urchin,  1,0.67,1,     -5, 0,550,500,40
  710DATA Brooch,  1,0.72,1,      5, 5,580,500,45
  720DATA Crochet, 4,0.27,0.9998, 2,10,600,550,42
  730DATA Fishbone,1,1.55,0.9985, 4,10,500,550,30
  740DATA Wings,   1,1.48,0.93,   4, 0,600,600,50

�     >Mira (Info9)
� By  John Williams
� For all machines
(� (c) BAU June 1993
2:
<?mode=12 : � 20 for multiscan monitors, 2 for 8-bit machines
F:
P� 0
Z�read_data
deg=�choose
n
� mode
x� 23;8202;0;0;0;0;
�
�plot(eg)
��
�:
�� �read_data
�� gs
�� g$(gs),f$(gs)
�� i=1 � gs
� � g$(i),f$(i)
��
�	� egs
�G� eg$(egs),g(i),A(egs),B(egs),X(egs),Y(egs),x0(egs),y0(egs),sc(egs)
�� i=1 � egs
�8 � eg$(i),g(i),A(i),B(i),X(i),Y(i),x0(i),y0(i),sc(i)
�
�
:
"
� �choose
,W�3);"Example";�15);"G-function";�35);"A";�45);"B";�55);"x(0) y(0) xc   yc   size"'
6� i=1 � egs
@k �;i;") ";eg$(i);�15);g$(g(i));�35);A(i);�45);B(i);�55);X(i);�60);Y(i);�65);x0(i);�70);y0(i);�75);sc(i)
J�
T� '"Choose:";
^�
h
 key=�-48
r� key>0  � key<=egs
|=key
�:
�� �plot(eg)
��
�9A=A(eg):B=B(eg):x=X(eg):y=Y(eg):s=sc(eg):g$=f$(g(eg))
�� 29,x0(eg);y0(eg);
�f=(1-A)*x+2*A*(1-�g$)
�� i=0 � 13000
�) � i>100 � 0,�(i/3000)+1:� 69,x*s,y*s
� z=x
� x=f+B*y
� f=(1-A)*x+2*A*(1-�g$)
�
 y=f-z
��
�
:
� G functions:
&� 8
0� "1 � (1+x�)","1/(1+x*x)"
:� "x � (1+x�)","x/(1+x*x)"
D"� "1 � �(1+x�)","1/SQR(1+x*x)"
N%� "sin x � (1+x�)","SINx/(1+x*x)"
X)� "x � (1+sgn x.x�)","x/(1+SGNx*x^3)"
b,� "x� � (1+sgn x.x�)","x*x/(1+x^3*SGNx)"
l"� "x.e[-abs x]","x*EXP(-ABSx)"
v-� "x.sin x.e[-abs x]","x*SINx*EXP(-ABSx)"
�:
�� Examples:
�� 8
�-� Bow,     4,1.49,1,      5, 0,550,550,30
�-� Toy,     1,0.69,1,     12, 0,600,500,15
�-� Petals,  5,0.77,1,      3, 7,550,550,30
�-� Urchin,  1,0.67,1,     -5, 0,550,500,40
�-� Brooch,  1,0.72,1,      5, 5,580,500,45
�-� Crochet, 4,0.27,0.9998, 2,10,600,550,42
�-� Fishbone,1,1.55,0.9985, 4,10,500,550,30
�-� Wings,   1,1.48,0.93,   4, 0,600,600,50
�
00000000  0d 00 0a 17 f4 20 20 20  20 20 3e 4d 69 72 61 20  |.....     >Mira |
00000010  28 49 6e 66 6f 39 29 0d  00 14 17 f4 20 42 79 20  |(Info9)..... By |
00000020  20 4a 6f 68 6e 20 57 69  6c 6c 69 61 6d 73 0d 00  | John Williams..|
00000030  1e 16 f4 20 46 6f 72 20  61 6c 6c 20 6d 61 63 68  |... For all mach|
00000040  69 6e 65 73 0d 00 28 17  f4 20 28 63 29 20 42 41  |ines..(.. (c) BA|
00000050  55 20 4a 75 6e 65 20 31  39 39 33 0d 00 32 05 3a  |U June 1993..2.:|
00000060  0d 00 3c 3f 6d 6f 64 65  3d 31 32 20 3a 20 f4 20  |..<?mode=12 : . |
00000070  32 30 20 66 6f 72 20 6d  75 6c 74 69 73 63 61 6e  |20 for multiscan|
00000080  20 6d 6f 6e 69 74 6f 72  73 2c 20 32 20 66 6f 72  | monitors, 2 for|
00000090  20 38 2d 62 69 74 20 6d  61 63 68 69 6e 65 73 0d  | 8-bit machines.|
000000a0  00 46 05 3a 0d 00 50 07  eb 20 30 0d 00 5a 0e f2  |.F.:..P.. 0..Z..|
000000b0  72 65 61 64 5f 64 61 74  61 0d 00 64 0e 65 67 3d  |read_data..d.eg=|
000000c0  a4 63 68 6f 6f 73 65 0d  00 6e 0a eb 20 6d 6f 64  |.choose..n.. mod|
000000d0  65 0d 00 78 16 ef 20 32  33 3b 38 32 30 32 3b 30  |e..x.. 23;8202;0|
000000e0  3b 30 3b 30 3b 30 3b 0d  00 82 0d f2 70 6c 6f 74  |;0;0;0;.....plot|
000000f0  28 65 67 29 0d 00 8c 05  e0 0d 00 96 05 3a 0d 00  |(eg).........:..|
00000100  a0 10 dd 20 f2 72 65 61  64 5f 64 61 74 61 0d 00  |... .read_data..|
00000110  aa 08 f3 20 67 73 0d 00  b4 13 de 20 67 24 28 67  |... gs..... g$(g|
00000120  73 29 2c 66 24 28 67 73  29 0d 00 be 0e e3 20 69  |s),f$(gs)..... i|
00000130  3d 31 20 b8 20 67 73 0d  00 c8 12 20 f3 20 67 24  |=1 . gs.... . g$|
00000140  28 69 29 2c 66 24 28 69  29 0d 00 d2 05 ed 0d 00  |(i),f$(i).......|
00000150  dc 09 f3 20 65 67 73 0d  00 e6 47 de 20 65 67 24  |... egs...G. eg$|
00000160  28 65 67 73 29 2c 67 28  69 29 2c 41 28 65 67 73  |(egs),g(i),A(egs|
00000170  29 2c 42 28 65 67 73 29  2c 58 28 65 67 73 29 2c  |),B(egs),X(egs),|
00000180  59 28 65 67 73 29 2c 78  30 28 65 67 73 29 2c 79  |Y(egs),x0(egs),y|
00000190  30 28 65 67 73 29 2c 73  63 28 65 67 73 29 0d 00  |0(egs),sc(egs)..|
000001a0  f0 0f e3 20 69 3d 31 20  b8 20 65 67 73 0d 00 fa  |... i=1 . egs...|
000001b0  38 20 f3 20 65 67 24 28  69 29 2c 67 28 69 29 2c  |8 . eg$(i),g(i),|
000001c0  41 28 69 29 2c 42 28 69  29 2c 58 28 69 29 2c 59  |A(i),B(i),X(i),Y|
000001d0  28 69 29 2c 78 30 28 69  29 2c 79 30 28 69 29 2c  |(i),x0(i),y0(i),|
000001e0  73 63 28 69 29 0d 01 04  05 ed 0d 01 0e 05 e1 0d  |sc(i)...........|
000001f0  01 18 05 3a 0d 01 22 0d  dd 20 a4 63 68 6f 6f 73  |...:..".. .choos|
00000200  65 0d 01 2c 57 f1 8a 33  29 3b 22 45 78 61 6d 70  |e..,W..3);"Examp|
00000210  6c 65 22 3b 8a 31 35 29  3b 22 47 2d 66 75 6e 63  |le";.15);"G-func|
00000220  74 69 6f 6e 22 3b 8a 33  35 29 3b 22 41 22 3b 8a  |tion";.35);"A";.|
00000230  34 35 29 3b 22 42 22 3b  8a 35 35 29 3b 22 78 28  |45);"B";.55);"x(|
00000240  30 29 20 79 28 30 29 20  78 63 20 20 20 79 63 20  |0) y(0) xc   yc |
00000250  20 20 73 69 7a 65 22 27  0d 01 36 0f e3 20 69 3d  |  size"'..6.. i=|
00000260  31 20 b8 20 65 67 73 0d  01 40 6b 20 f1 3b 69 3b  |1 . egs..@k .;i;|
00000270  22 29 20 22 3b 65 67 24  28 69 29 3b 8a 31 35 29  |") ";eg$(i);.15)|
00000280  3b 67 24 28 67 28 69 29  29 3b 8a 33 35 29 3b 41  |;g$(g(i));.35);A|
00000290  28 69 29 3b 8a 34 35 29  3b 42 28 69 29 3b 8a 35  |(i);.45);B(i);.5|
000002a0  35 29 3b 58 28 69 29 3b  8a 36 30 29 3b 59 28 69  |5);X(i);.60);Y(i|
000002b0  29 3b 8a 36 35 29 3b 78  30 28 69 29 3b 8a 37 30  |);.65);x0(i);.70|
000002c0  29 3b 79 30 28 69 29 3b  8a 37 35 29 3b 73 63 28  |);y0(i);.75);sc(|
000002d0  69 29 0d 01 4a 05 ed 0d  01 54 11 f1 20 27 22 43  |i)..J....T.. '"C|
000002e0  68 6f 6f 73 65 3a 22 3b  0d 01 5e 05 f5 0d 01 68  |hoose:";..^....h|
000002f0  0d 20 6b 65 79 3d a5 2d  34 38 0d 01 72 17 fd 20  |. key=.-48..r.. |
00000300  6b 65 79 3e 30 20 20 80  20 6b 65 79 3c 3d 65 67  |key>0  . key<=eg|
00000310  73 0d 01 7c 08 3d 6b 65  79 0d 01 86 05 3a 0d 01  |s..|.=key....:..|
00000320  90 0f dd 20 f2 70 6c 6f  74 28 65 67 29 0d 01 9a  |... .plot(eg)...|
00000330  05 db 0d 01 a4 39 41 3d  41 28 65 67 29 3a 42 3d  |.....9A=A(eg):B=|
00000340  42 28 65 67 29 3a 78 3d  58 28 65 67 29 3a 79 3d  |B(eg):x=X(eg):y=|
00000350  59 28 65 67 29 3a 73 3d  73 63 28 65 67 29 3a 67  |Y(eg):s=sc(eg):g|
00000360  24 3d 66 24 28 67 28 65  67 29 29 0d 01 ae 17 ef  |$=f$(g(eg)).....|
00000370  20 32 39 2c 78 30 28 65  67 29 3b 79 30 28 65 67  | 29,x0(eg);y0(eg|
00000380  29 3b 0d 01 b8 19 66 3d  28 31 2d 41 29 2a 78 2b  |);....f=(1-A)*x+|
00000390  32 2a 41 2a 28 31 2d a0  67 24 29 0d 01 c2 11 e3  |2*A*(1-.g$).....|
000003a0  20 69 3d 30 20 b8 20 31  33 30 30 30 0d 01 cc 29  | i=0 . 13000...)|
000003b0  20 e7 20 69 3e 31 30 30  20 e6 20 30 2c a8 28 69  | . i>100 . 0,.(i|
000003c0  2f 33 30 30 30 29 2b 31  3a f0 20 36 39 2c 78 2a  |/3000)+1:. 69,x*|
000003d0  73 2c 79 2a 73 0d 01 d6  08 20 7a 3d 78 0d 01 e0  |s,y*s.... z=x...|
000003e0  0c 20 78 3d 66 2b 42 2a  79 0d 01 ea 1a 20 66 3d  |. x=f+B*y.... f=|
000003f0  28 31 2d 41 29 2a 78 2b  32 2a 41 2a 28 31 2d a0  |(1-A)*x+2*A*(1-.|
00000400  67 24 29 0d 01 f4 0a 20  79 3d 66 2d 7a 0d 01 fe  |g$).... y=f-z...|
00000410  05 ed 0d 02 08 05 e1 0d  02 12 05 3a 0d 02 1c 12  |...........:....|
00000420  f4 20 47 20 66 75 6e 63  74 69 6f 6e 73 3a 0d 02  |. G functions:..|
00000430  26 07 dc 20 38 0d 02 30  1e dc 20 22 31 20 f7 20  |&.. 8..0.. "1 . |
00000440  28 31 2b 78 b2 29 22 2c  22 31 2f 28 31 2b 78 2a  |(1+x.)","1/(1+x*|
00000450  78 29 22 0d 02 3a 1e dc  20 22 78 20 f7 20 28 31  |x)"..:.. "x . (1|
00000460  2b 78 b2 29 22 2c 22 78  2f 28 31 2b 78 2a 78 29  |+x.)","x/(1+x*x)|
00000470  22 0d 02 44 22 dc 20 22  31 20 f7 20 80 28 31 2b  |"..D". "1 . .(1+|
00000480  78 b2 29 22 2c 22 31 2f  53 51 52 28 31 2b 78 2a  |x.)","1/SQR(1+x*|
00000490  78 29 22 0d 02 4e 25 dc  20 22 73 69 6e 20 78 20  |x)"..N%. "sin x |
000004a0  f7 20 28 31 2b 78 b2 29  22 2c 22 53 49 4e 78 2f  |. (1+x.)","SINx/|
000004b0  28 31 2b 78 2a 78 29 22  0d 02 58 29 dc 20 22 78  |(1+x*x)"..X). "x|
000004c0  20 f7 20 28 31 2b 73 67  6e 20 78 2e 78 b3 29 22  | . (1+sgn x.x.)"|
000004d0  2c 22 78 2f 28 31 2b 53  47 4e 78 2a 78 5e 33 29  |,"x/(1+SGNx*x^3)|
000004e0  22 0d 02 62 2c dc 20 22  78 b2 20 f7 20 28 31 2b  |"..b,. "x. . (1+|
000004f0  73 67 6e 20 78 2e 78 b3  29 22 2c 22 78 2a 78 2f  |sgn x.x.)","x*x/|
00000500  28 31 2b 78 5e 33 2a 53  47 4e 78 29 22 0d 02 6c  |(1+x^3*SGNx)"..l|
00000510  22 dc 20 22 78 2e 65 5b  2d 61 62 73 20 78 5d 22  |". "x.e[-abs x]"|
00000520  2c 22 78 2a 45 58 50 28  2d 41 42 53 78 29 22 0d  |,"x*EXP(-ABSx)".|
00000530  02 76 2d dc 20 22 78 2e  73 69 6e 20 78 2e 65 5b  |.v-. "x.sin x.e[|
00000540  2d 61 62 73 20 78 5d 22  2c 22 78 2a 53 49 4e 78  |-abs x]","x*SINx|
00000550  2a 45 58 50 28 2d 41 42  53 78 29 22 0d 02 80 05  |*EXP(-ABSx)"....|
00000560  3a 0d 02 8a 0f f4 20 45  78 61 6d 70 6c 65 73 3a  |:..... Examples:|
00000570  0d 02 94 07 dc 20 38 0d  02 9e 2d dc 20 42 6f 77  |..... 8...-. Bow|
00000580  2c 20 20 20 20 20 34 2c  31 2e 34 39 2c 31 2c 20  |,     4,1.49,1, |
00000590  20 20 20 20 20 35 2c 20  30 2c 35 35 30 2c 35 35  |     5, 0,550,55|
000005a0  30 2c 33 30 0d 02 a8 2d  dc 20 54 6f 79 2c 20 20  |0,30...-. Toy,  |
000005b0  20 20 20 31 2c 30 2e 36  39 2c 31 2c 20 20 20 20  |   1,0.69,1,    |
000005c0  20 31 32 2c 20 30 2c 36  30 30 2c 35 30 30 2c 31  | 12, 0,600,500,1|
000005d0  35 0d 02 b2 2d dc 20 50  65 74 61 6c 73 2c 20 20  |5...-. Petals,  |
000005e0  35 2c 30 2e 37 37 2c 31  2c 20 20 20 20 20 20 33  |5,0.77,1,      3|
000005f0  2c 20 37 2c 35 35 30 2c  35 35 30 2c 33 30 0d 02  |, 7,550,550,30..|
00000600  bc 2d dc 20 55 72 63 68  69 6e 2c 20 20 31 2c 30  |.-. Urchin,  1,0|
00000610  2e 36 37 2c 31 2c 20 20  20 20 20 2d 35 2c 20 30  |.67,1,     -5, 0|
00000620  2c 35 35 30 2c 35 30 30  2c 34 30 0d 02 c6 2d dc  |,550,500,40...-.|
00000630  20 42 72 6f 6f 63 68 2c  20 20 31 2c 30 2e 37 32  | Brooch,  1,0.72|
00000640  2c 31 2c 20 20 20 20 20  20 35 2c 20 35 2c 35 38  |,1,      5, 5,58|
00000650  30 2c 35 30 30 2c 34 35  0d 02 d0 2d dc 20 43 72  |0,500,45...-. Cr|
00000660  6f 63 68 65 74 2c 20 34  2c 30 2e 32 37 2c 30 2e  |ochet, 4,0.27,0.|
00000670  39 39 39 38 2c 20 32 2c  31 30 2c 36 30 30 2c 35  |9998, 2,10,600,5|
00000680  35 30 2c 34 32 0d 02 da  2d dc 20 46 69 73 68 62  |50,42...-. Fishb|
00000690  6f 6e 65 2c 31 2c 31 2e  35 35 2c 30 2e 39 39 38  |one,1,1.55,0.998|
000006a0  35 2c 20 34 2c 31 30 2c  35 30 30 2c 35 35 30 2c  |5, 4,10,500,550,|
000006b0  33 30 0d 02 e4 2d dc 20  57 69 6e 67 73 2c 20 20  |30...-. Wings,  |
000006c0  20 31 2c 31 2e 34 38 2c  30 2e 39 33 2c 20 20 20  | 1,1.48,0.93,   |
000006d0  34 2c 20 30 2c 36 30 30  2c 36 30 30 2c 35 30 0d  |4, 0,600,600,50.|
000006e0  ff                                                |.|
000006e1