Home » Personal collection » Acorn ADFS disks » Electron » Programs.ADF » Graphics/Mandelbrot

Graphics/Mandelbrot

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 » Personal collection » Acorn ADFS disks » Electron » Programs.ADF
Filename: Graphics/Mandelbrot
Read OK:
File size: 0EC0 bytes
Load address: FFFF0E00
Exec address: FFFF8023
File contents
   10REM PROGRAM MANDLEBROT PLOT
   20REM VERSION B0.2
   30REM AUTHOR Kate Crennell
   40REM BEEBUG MAY 1986
   50REM PROGRAM SUBJECT TO COPYRIGHT
   60:
  100DIM KOL%(4),C$(7)
  110ON ERROR GOTO 340
  120C$(0)=CHR$135+"BLACK,  ":C$(1)=CHR$129+"RED,   ":C$(2)=CHR$130+"GREEN, ":C$(3)=CHR$131+"YELLOW,":C$(4)=CHR$132+"BLUE,  ":C$(5)=CHR$133+"MAGENTA,":C$(6)=CHR$134+"CYAN,  ":C$(7)=CHR$135+"WHITE, "
  130VDU 23,255,255,255,255,255,255,255,255,255
  140M%=0:MODE7
  150E%=1:PROCmode
  160E%=2:PROCrule
  170E%=3:PROCarea
  180MODE7:E%=4:PROCkols
  190MODEM%
  200IFM%=1 FORI%=0TO3:VDU19,I%,KOL%(I%)MOD16;0;:NEXT
  210VDU28,G%,31,H%,0:@%=4:PRINTT%+3:@%=&20508:PRINTXMIN;:@%=&10308:PRINTW;:@%=&20508:PRINTYMIN;:@%=10308:PRINTH:@%=11-%*4:FORI%=0TOC%:PRINT?(&C10+I%);:COLOUR?(&C00+I%):VDU255:COLOUR7:NEXT:@%=8/M%
  220E%=6:VDU4,23;8202;0;0;0;28,G%,31,H%,29
  230PROCmandel(XMIN,YMIN,DX,DY)
  240E%=5:VDU7,4,28,G%,31,H%,26:CLS
  250PRINT"Save Y/N";:PROCQ:IFA$="Y"INPUT"Filename",F$:GOTO260 ELSE 310
  260IFINSTR(F$,"""")<>0GOTO250 ELSE IF LEN(F$)>6GOTO250
  270F$="P."+STR$(M%+2+2*T%)+F$
  280IFM%=1 FORI%=0TO3:?(I%+&7FFC)=KOL%(I%)MOD16:NEXT
  290$&C80="SAVE "+F$+" 3000 8000"
  300U%=X%:V%=Y%:X%=&80:Y%=&C:CALL&FFF7:X%=U%:Y%=V%
  310PROCbox:IFA$="Y"MODE7:GOTO170
  320CLS:PRINT"MORE Y/N";:PROCQ:IF A$="Y"GOTO180
  330MODE7:END
  340IFE%<>5ORERR<190 GOTO 360
  350PRINT"FILING ERROR ";ERR:GOTO250
  360IF ERR<>17 MODE7:REPORT:PRINT" AT LINE ";ERL:END
  370ON E% GOTO 380,150,160,170,180,240
  380MODE 7:END
  390:
 1000DEFPROCkols
 1010J%=0
 1020CLS:PRINT''"NUMBER COLOUR  LOWER BOUND"
 1030@%=6:FORI%=0TOC%:K%=?(&C00+I%):IFM%=1 K%=KOL%(K%)
 1040PRINT I%+1;:IFK%>0PRINT"   "+CHR$(128+K%)+CHR$255+CHR$135,?(&C10+I%) ELSE PRINTSPC(6),?(&C10+I%)
 1050NEXT:PRINT"These are the colours to be plotted for each new boundary of iterations."'
 1060IFJ%=C%+1 GOTO1110 ELSE:PRINT'"Number of boundaries OK (Y/N)";:PROCQ
 1070IFA$="Y"J%=C%+1:GOTO1110
 1080PRINT"How many boundaries (2-15) ";:J%=GET-48:PRINT;J%;:IFJ%<1 OR J%>9 GOTO1080
 1090IF J%=1:K%=GET-48:PRINT;K%;:J%=10+K%
 1095IFJ%<>C%+1 PROCbnd
 1100IFJ%<2 OR J%>15 GOTO1070 ELSE C%=J%-1:GOTO1020
 1110PRINT'"Which colour/bound to change?"'"(RETURN if none)";:K%=GET-48:PRINT;K%;:IF K%=0 OR K%=-35 THEN ENDPROC
 1120IFK%=1 AND J%>9 I%=GET-48:IF I%>-35 K%=10+I%:PRINT;I%;
 1130IF K%>J% GOTO 1110
 1140IFM%=2PRINT'"Colours are:":FORI%=0TO7:PRINT;C%(I%)+" ";:NEXT:GOTO1200
 1150PRINT'"Background colour is "+C$(KOL$(0)MOD8'"Printing will be in "+C$(KOL%(3)MOD8)
 1160PRINT"Primary colours available:":FORI%=0TO3:IFKOL(I%)>16 PRINT;C$(KOL%(I%))+" ";
 1170NEXT:PRINT'"Other possible colours:":FORI%=0TO7:F%=0:FORN%=0TO3:IFKOL%(N%)=I% F%=1
 1180NEXT:IFF%=0 PRINT;C$(I%);SPC1;
 1190NEXT
 1200I%=10:INPUT'"Which colour",A$:IFA$=""GOTO1330 ELSE A$=LEFT$(A$,3)
 1210FORN%=0TO7:IFA$=LEFT$(C$(N%),2,3) I%=N%
 1220NEXT
 1230IFI%=10GOTO1200
 1240IFM%=2 ?(&BFF+K%)=I%:GOTO1320
 1250F%=0:FORN%=0TO3:IFI%=KOL%(N%) ?(&BFF+K%))=N%:F%=-1
 1260IFF%=0KOL%(?(&BFF+K%))=I%:GOTO1320
 1270NEXT:IFF%>0KOL%(F%-1)=I%:?(&BFF+K%)=F%-1:GOTO1320
 1280IFF%=0KOL%(?(&BFF+K%))=I%:GOTO1320
 1290FORI%=0TO3:F%=0:FORN%=0TOC%:IF?(&C00+N%)=I% F%=1
 1300NEXT:IFF%=0KOL%(I%)=16
 1310NEXT
 1320IFK%=1GOTO1020
 1330INPUT"What new iteration for this colour",L%:IFL%<0GOTO1330
 1340IF L%=0GOTO1020
 1350IFL%<?(&C0E+K%)+1GOTO1390
 1360IFL%>255GOTO1390
 1370IFK%<J% AND L%>?(&C10+K%)-1 GOTO1390
 1380?(&C0F+K%)=L%:GOTO1020
 1390PRINT"New range incompatible with old":GOTO1330
 1400:
 1410DEFPROCarea
 1420CLS:@%=&2070A:PRINT''"Left X bound="XMIN;", width="W'"Low Y bound="YMIN;", height="H':PROCask:IFA$="Y"THEN1470
 1430INPUT"New left X",XMIN
 1440INPUT"New width",W:IFW=0GOTO1440
 1450INPUT"New bottom Y",YMIN
 1460INPUT"New height",H:IFH=0GOTO1460
 1470L%=256/M%:R=ABS(H/W):IFR>1 Y%=L%-1:X%=Y%/R+0.5 ELSE X%=L%-1:Y%=X%*R+0.5
 1480@%=4:PRINT'"The plot will have ";X%+1;" columns"'"and ";Y%+1;" rows."'':PROCask:IFA$="Y"THEN1510
 1490PRINT'"New number of columns ( <";L%+1" )";:INPUT,I%:IFI%<1 OR I%>L% PRINT" Illegal value":GOTO1490 ELSE X%=I%-1
 1500PRINT"New number of rows ( <";L%+1" )";:INPUT,I%:IFI%<1 OR I%>L% PRINT" Illegal value":GOTO1490 ELSE Y%=I%-1
 1510DX=W/X%:DY=H/Y%:ENDPROC
 1520:
 1530DEFPROCask
 1540*FX202,40
 1550PRINT;" Is this OK (Y/N)";PROCQ:ENDPROC
 1560DEFPROCQ:PRINT;"?";
 1570A$=CHR$(GET AND 223):IFA$<>"Y"AND A$<>"N"GOTO1570
 1580PRINT;A$:ENDPROC
 1590:
 1600DEFPROCmode
 1610T%=-1:@%=10
 1620CLS:PRINTTAB(7,1)CHR$134"The Mandelbrot Set"'''
 1630PRINT"There are two available plot modes:"''"1)"+CHR$131+"High resolution (256 lines) and"'"four colours,"''"2) Low resolution (128 lines) and"'CHR$131+"eight"+CHR$135+"colours."'
 1640IFM%=0 PRINT'"Which mode would you like (1 or 2)? ";:M%=GET-48 ELSE GOTO 1660

� PROGRAM MANDLEBROT PLOT
� VERSION B0.2
� AUTHOR Kate Crennell
(� BEEBUG MAY 1986
2"� PROGRAM SUBJECT TO COPYRIGHT
<:
d� KOL%(4),C$(7)
n� � � �DTA
x�C$(0)=�135+"BLACK,  ":C$(1)=�129+"RED,   ":C$(2)=�130+"GREEN, ":C$(3)=�131+"YELLOW,":C$(4)=�132+"BLUE,  ":C$(5)=�133+"MAGENTA,":C$(6)=�134+"CYAN,  ":C$(7)=�135+"WHITE, "
�,� 23,255,255,255,255,255,255,255,255,255
�M%=0:�7
�E%=1:�mode
�E%=2:�rule
�E%=3:�area
��7:E%=4:�kols
��M%
�)�M%=1 �I%=0�3:�19,I%,KOL%(I%)�16;0;:�
җ�28,G%,31,H%,0:@%=4:�T%+3:@%=&20508:�XMIN;:@%=&10308:�W;:@%=&20508:�YMIN;:@%=10308:�H:@%=11-%*4:�I%=0�C%:�?(&C10+I%);:�?(&C00+I%):�255:�7:�:@%=8/M%
�(E%=6:�4,23;8202;0;0;0;28,G%,31,H%,29
��mandel(XMIN,YMIN,DX,DY)
�E%=5:�7,4,28,G%,31,H%,26:�
�6�"Save Y/N";:�Q:�A$="Y"�"Filename",F$:�TDA � �TvA
'�F$,"""")<>0�dz@ � � �(F$)>6�dz@
F$="P."+�(M%+2+2*T%)+F$
+�M%=1 �I%=0�3:?(I%+&7FFC)=KOL%(I%)�16:�
"!$&C80="SAVE "+F$+" 3000 8000"
,/U%=X%:V%=Y%:X%=&80:Y%=&C:�&FFF7:X%=U%:Y%=V%
6�box:�A$="Y"�7:�tj@
@#�:�"MORE Y/N";:�Q:� A$="Y"�tt@
J�7:�
T�E%<>5��<190 � �DhA
^�"FILING ERROR ";�:�dz@
h!� �<>17 �7:�:�" AT LINE ";�:�
r(� E% � �D|A,�tV@,�t`@,�tj@,�tt@,�dp@
|	� 7:�
�:
�
��kols
�J%=0
�%�:�''"NUMBER COLOUR  LOWER BOUND"
1@%=6:�I%=0�C%:K%=?(&C00+I%):�M%=1 K%=KOL%(K%)
I� I%+1;:�K%>0�"   "+�(128+K%)+�255+�135,?(&C10+I%) � �(6),?(&C10+I%)
R�:�"These are the colours to be plotted for each new boundary of iterations."'
$:�J%=C%+1 �DVD �:�'"Number of boundaries OK (Y/N)";:�Q
.�A$="Y"J%=C%+1:�DVD
8D�"How many boundaries (2-15) ";:J%=�-48:�;J%;:�J%<1 � J%>9 �TxD
B!� J%=1:K%=�-48:�;K%;:J%=10+K%
G�J%<>C%+1 �bnd
L'�J%<2 � J%>15 �TnD � C%=J%-1:�d|C
V[�'"Which colour/bound to change?"'"(RETURN if none)";:K%=�-48:�;K%;:� K%=0 � K%=-35 � �
`0�K%=1 � J%>9 I%=�-48:� I%>-35 K%=10+I%:�;I%;
j� K%>J% � �DVD
t7�M%=2�'"Colours are:":�I%=0�7:�;C%(I%)+" ";:�:�tpD
~O�'"Background colour is "+C$(KOL$(0)�8'"Printing will be in "+C$(KOL%(3)�8)
�I�"Primary colours available:":�I%=0�3:�KOL(I%)>16 �;C$(KOL%(I%))+" ";
�H�:�'"Other possible colours:":�I%=0�7:F%=0:�N%=0�3:�KOL%(N%)=I% F%=1
��:�F%=0 �;C$(I%);�1;
��
�5I%=10:�'"Which colour",A$:�A$=""�TrE � A$=�A$,3)
�"�N%=0�7:�A$=�C$(N%),2,3) I%=N%
��
��I%=10�tpD
��M%=2 ?(&BFF+K%)=I%:�ThE
�2F%=0:�N%=0�3:�I%=KOL%(N%) ?(&BFF+K%))=N%:F%=-1
�"�F%=0KOL%(?(&BFF+K%))=I%:�ThE
�.�:�F%>0KOL%(F%-1)=I%:?(&BFF+K%)=F%-1:�ThE
"�F%=0KOL%(?(&BFF+K%))=I%:�ThE

-�I%=0�3:F%=0:�N%=0�C%:�?(&C00+N%)=I% F%=1
�:�F%=0KOL%(I%)=16
�
(�K%=1�d|C
27�"What new iteration for this colour",L%:�L%<0�TrE
<� L%=0�d|C
F�L%<?(&C0E+K%)+1�DnE
P�L%>255�DnE
Z"�K%<J% � L%>?(&C10+K%)-1 �DnE
d?(&C0F+K%)=L%:�d|C
n,�"New range incompatible with old":�TrE
x:
�
��area
�e�:@%=&2070A:�''"Left X bound="XMIN;", width="W'"Low Y bound="YMIN;", height="H':�ask:�A$="Y"��t~E
��"New left X",XMIN
��"New width",W:�W=0�t`E
��"New bottom Y",YMIN
��"New height",H:�H=0�ttE
�EL%=256/M%:R=�(H/W):�R>1 Y%=L%-1:X%=Y%/R+0.5 � X%=L%-1:Y%=X%*R+0.5
�Y@%=4:�'"The plot will have ";X%+1;" columns"'"and ";Y%+1;" rows."'':�ask:�A$="Y"��dfE
�`�'"New number of columns ( <";L%+1" )";:�,I%:�I%<1 � I%>L% �" Illegal value":�dRE � X%=I%-1
�\�"New number of rows ( <";L%+1" )";:�,I%:�I%<1 � I%>L% �" Illegal value":�dRE � Y%=I%-1
�DX=W/X%:DY=H/Y%:�
�:
�	��ask

*FX202,40
�;" Is this OK (Y/N)";�Q:�
��Q:�;"?";
"(A$=�(� � 223):�A$<>"Y"� A$<>"N"�TbF
,
�;A$:�
6:
@
��mode
JT%=-1:@%=10
T'�:�7,1)�134"The Mandelbrot Set"'''
^��"There are two available plot modes:"''"1)"+�131+"High resolution (256 lines) and"'"four colours,"''"2) Low resolution (128 lines) and"'�131+"eight"+�135+"colours."'
hD�M%=0 �'"Which mode would you like (1 or 2)? ";:M%=�-48 � � �D|F
�
00000000  0d 00 0a 1d f4 20 50 52  4f 47 52 41 4d 20 4d 41  |..... PROGRAM MA|
00000010  4e 44 4c 45 42 52 4f 54  20 50 4c 4f 54 0d 00 14  |NDLEBROT PLOT...|
00000020  12 f4 20 56 45 52 53 49  4f 4e 20 42 30 2e 32 0d  |.. VERSION B0.2.|
00000030  00 1e 1a f4 20 41 55 54  48 4f 52 20 4b 61 74 65  |.... AUTHOR Kate|
00000040  20 43 72 65 6e 6e 65 6c  6c 0d 00 28 15 f4 20 42  | Crennell..(.. B|
00000050  45 45 42 55 47 20 4d 41  59 20 31 39 38 36 0d 00  |EEBUG MAY 1986..|
00000060  32 22 f4 20 50 52 4f 47  52 41 4d 20 53 55 42 4a  |2". PROGRAM SUBJ|
00000070  45 43 54 20 54 4f 20 43  4f 50 59 52 49 47 48 54  |ECT TO COPYRIGHT|
00000080  0d 00 3c 05 3a 0d 00 64  13 de 20 4b 4f 4c 25 28  |..<.:..d.. KOL%(|
00000090  34 29 2c 43 24 28 37 29  0d 00 6e 0e ee 20 85 20  |4),C$(7)..n.. . |
000000a0  e5 20 8d 44 54 41 0d 00  78 ad 43 24 28 30 29 3d  |. .DTA..x.C$(0)=|
000000b0  bd 31 33 35 2b 22 42 4c  41 43 4b 2c 20 20 22 3a  |.135+"BLACK,  ":|
000000c0  43 24 28 31 29 3d bd 31  32 39 2b 22 52 45 44 2c  |C$(1)=.129+"RED,|
000000d0  20 20 20 22 3a 43 24 28  32 29 3d bd 31 33 30 2b  |   ":C$(2)=.130+|
000000e0  22 47 52 45 45 4e 2c 20  22 3a 43 24 28 33 29 3d  |"GREEN, ":C$(3)=|
000000f0  bd 31 33 31 2b 22 59 45  4c 4c 4f 57 2c 22 3a 43  |.131+"YELLOW,":C|
00000100  24 28 34 29 3d bd 31 33  32 2b 22 42 4c 55 45 2c  |$(4)=.132+"BLUE,|
00000110  20 20 22 3a 43 24 28 35  29 3d bd 31 33 33 2b 22  |  ":C$(5)=.133+"|
00000120  4d 41 47 45 4e 54 41 2c  22 3a 43 24 28 36 29 3d  |MAGENTA,":C$(6)=|
00000130  bd 31 33 34 2b 22 43 59  41 4e 2c 20 20 22 3a 43  |.134+"CYAN,  ":C|
00000140  24 28 37 29 3d bd 31 33  35 2b 22 57 48 49 54 45  |$(7)=.135+"WHITE|
00000150  2c 20 22 0d 00 82 2c ef  20 32 33 2c 32 35 35 2c  |, "...,. 23,255,|
00000160  32 35 35 2c 32 35 35 2c  32 35 35 2c 32 35 35 2c  |255,255,255,255,|
00000170  32 35 35 2c 32 35 35 2c  32 35 35 2c 32 35 35 0d  |255,255,255,255.|
00000180  00 8c 0b 4d 25 3d 30 3a  eb 37 0d 00 96 0e 45 25  |...M%=0:.7....E%|
00000190  3d 31 3a f2 6d 6f 64 65  0d 00 a0 0e 45 25 3d 32  |=1:.mode....E%=2|
000001a0  3a f2 72 75 6c 65 0d 00  aa 0e 45 25 3d 33 3a f2  |:.rule....E%=3:.|
000001b0  61 72 65 61 0d 00 b4 11  eb 37 3a 45 25 3d 34 3a  |area.....7:E%=4:|
000001c0  f2 6b 6f 6c 73 0d 00 be  07 eb 4d 25 0d 00 c8 29  |.kols.....M%...)|
000001d0  e7 4d 25 3d 31 20 e3 49  25 3d 30 b8 33 3a ef 31  |.M%=1 .I%=0.3:.1|
000001e0  39 2c 49 25 2c 4b 4f 4c  25 28 49 25 29 83 31 36  |9,I%,KOL%(I%).16|
000001f0  3b 30 3b 3a ed 0d 00 d2  97 ef 32 38 2c 47 25 2c  |;0;:......28,G%,|
00000200  33 31 2c 48 25 2c 30 3a  40 25 3d 34 3a f1 54 25  |31,H%,0:@%=4:.T%|
00000210  2b 33 3a 40 25 3d 26 32  30 35 30 38 3a f1 58 4d  |+3:@%=&20508:.XM|
00000220  49 4e 3b 3a 40 25 3d 26  31 30 33 30 38 3a f1 57  |IN;:@%=&10308:.W|
00000230  3b 3a 40 25 3d 26 32 30  35 30 38 3a f1 59 4d 49  |;:@%=&20508:.YMI|
00000240  4e 3b 3a 40 25 3d 31 30  33 30 38 3a f1 48 3a 40  |N;:@%=10308:.H:@|
00000250  25 3d 31 31 2d 25 2a 34  3a e3 49 25 3d 30 b8 43  |%=11-%*4:.I%=0.C|
00000260  25 3a f1 3f 28 26 43 31  30 2b 49 25 29 3b 3a fb  |%:.?(&C10+I%);:.|
00000270  3f 28 26 43 30 30 2b 49  25 29 3a ef 32 35 35 3a  |?(&C00+I%):.255:|
00000280  fb 37 3a ed 3a 40 25 3d  38 2f 4d 25 0d 00 dc 28  |.7:.:@%=8/M%...(|
00000290  45 25 3d 36 3a ef 34 2c  32 33 3b 38 32 30 32 3b  |E%=6:.4,23;8202;|
000002a0  30 3b 30 3b 30 3b 32 38  2c 47 25 2c 33 31 2c 48  |0;0;0;28,G%,31,H|
000002b0  25 2c 32 39 0d 00 e6 1c  f2 6d 61 6e 64 65 6c 28  |%,29.....mandel(|
000002c0  58 4d 49 4e 2c 59 4d 49  4e 2c 44 58 2c 44 59 29  |XMIN,YMIN,DX,DY)|
000002d0  0d 00 f0 1e 45 25 3d 35  3a ef 37 2c 34 2c 32 38  |....E%=5:.7,4,28|
000002e0  2c 47 25 2c 33 31 2c 48  25 2c 32 36 3a db 0d 00  |,G%,31,H%,26:...|
000002f0  fa 36 f1 22 53 61 76 65  20 59 2f 4e 22 3b 3a f2  |.6."Save Y/N";:.|
00000300  51 3a e7 41 24 3d 22 59  22 e8 22 46 69 6c 65 6e  |Q:.A$="Y"."Filen|
00000310  61 6d 65 22 2c 46 24 3a  e5 8d 54 44 41 20 8b 20  |ame",F$:..TDA . |
00000320  8d 54 76 41 0d 01 04 27  e7 a7 46 24 2c 22 22 22  |.TvA...'..F$,"""|
00000330  22 29 3c 3e 30 e5 8d 64  7a 40 20 8b 20 e7 20 a9  |")<>0..dz@ . . .|
00000340  28 46 24 29 3e 36 e5 8d  64 7a 40 0d 01 0e 1b 46  |(F$)>6..dz@....F|
00000350  24 3d 22 50 2e 22 2b c3  28 4d 25 2b 32 2b 32 2a  |$="P."+.(M%+2+2*|
00000360  54 25 29 2b 46 24 0d 01  18 2b e7 4d 25 3d 31 20  |T%)+F$...+.M%=1 |
00000370  e3 49 25 3d 30 b8 33 3a  3f 28 49 25 2b 26 37 46  |.I%=0.3:?(I%+&7F|
00000380  46 43 29 3d 4b 4f 4c 25  28 49 25 29 83 31 36 3a  |FC)=KOL%(I%).16:|
00000390  ed 0d 01 22 21 24 26 43  38 30 3d 22 53 41 56 45  |..."!$&C80="SAVE|
000003a0  20 22 2b 46 24 2b 22 20  33 30 30 30 20 38 30 30  | "+F$+" 3000 800|
000003b0  30 22 0d 01 2c 2f 55 25  3d 58 25 3a 56 25 3d 59  |0"..,/U%=X%:V%=Y|
000003c0  25 3a 58 25 3d 26 38 30  3a 59 25 3d 26 43 3a d6  |%:X%=&80:Y%=&C:.|
000003d0  26 46 46 46 37 3a 58 25  3d 55 25 3a 59 25 3d 56  |&FFF7:X%=U%:Y%=V|
000003e0  25 0d 01 36 18 f2 62 6f  78 3a e7 41 24 3d 22 59  |%..6..box:.A$="Y|
000003f0  22 eb 37 3a e5 8d 74 6a  40 0d 01 40 23 db 3a f1  |".7:..tj@..@#.:.|
00000400  22 4d 4f 52 45 20 59 2f  4e 22 3b 3a f2 51 3a e7  |"MORE Y/N";:.Q:.|
00000410  20 41 24 3d 22 59 22 e5  8d 74 74 40 0d 01 4a 08  | A$="Y"..tt@..J.|
00000420  eb 37 3a e0 0d 01 54 17  e7 45 25 3c 3e 35 84 9f  |.7:...T..E%<>5..|
00000430  3c 31 39 30 20 e5 20 8d  44 68 41 0d 01 5e 1c f1  |<190 . .DhA..^..|
00000440  22 46 49 4c 49 4e 47 20  45 52 52 4f 52 20 22 3b  |"FILING ERROR ";|
00000450  9f 3a e5 8d 64 7a 40 0d  01 68 21 e7 20 9f 3c 3e  |.:..dz@..h!. .<>|
00000460  31 37 20 eb 37 3a f6 3a  f1 22 20 41 54 20 4c 49  |17 .7:.:." AT LI|
00000470  4e 45 20 22 3b 9e 3a e0  0d 01 72 28 ee 20 45 25  |NE ";.:...r(. E%|
00000480  20 e5 20 8d 44 7c 41 2c  8d 74 56 40 2c 8d 74 60  | . .D|A,.tV@,.t`|
00000490  40 2c 8d 74 6a 40 2c 8d  74 74 40 2c 8d 64 70 40  |@,.tj@,.tt@,.dp@|
000004a0  0d 01 7c 09 eb 20 37 3a  e0 0d 01 86 05 3a 0d 03  |..|.. 7:.....:..|
000004b0  e8 0a dd f2 6b 6f 6c 73  0d 03 f2 08 4a 25 3d 30  |....kols....J%=0|
000004c0  0d 03 fc 25 db 3a f1 27  27 22 4e 55 4d 42 45 52  |...%.:.''"NUMBER|
000004d0  20 43 4f 4c 4f 55 52 20  20 4c 4f 57 45 52 20 42  | COLOUR  LOWER B|
000004e0  4f 55 4e 44 22 0d 04 06  31 40 25 3d 36 3a e3 49  |OUND"...1@%=6:.I|
000004f0  25 3d 30 b8 43 25 3a 4b  25 3d 3f 28 26 43 30 30  |%=0.C%:K%=?(&C00|
00000500  2b 49 25 29 3a e7 4d 25  3d 31 20 4b 25 3d 4b 4f  |+I%):.M%=1 K%=KO|
00000510  4c 25 28 4b 25 29 0d 04  10 49 f1 20 49 25 2b 31  |L%(K%)...I. I%+1|
00000520  3b 3a e7 4b 25 3e 30 f1  22 20 20 20 22 2b bd 28  |;:.K%>0."   "+.(|
00000530  31 32 38 2b 4b 25 29 2b  bd 32 35 35 2b bd 31 33  |128+K%)+.255+.13|
00000540  35 2c 3f 28 26 43 31 30  2b 49 25 29 20 8b 20 f1  |5,?(&C10+I%) . .|
00000550  89 28 36 29 2c 3f 28 26  43 31 30 2b 49 25 29 0d  |.(6),?(&C10+I%).|
00000560  04 1a 52 ed 3a f1 22 54  68 65 73 65 20 61 72 65  |..R.:."These are|
00000570  20 74 68 65 20 63 6f 6c  6f 75 72 73 20 74 6f 20  | the colours to |
00000580  62 65 20 70 6c 6f 74 74  65 64 20 66 6f 72 20 65  |be plotted for e|
00000590  61 63 68 20 6e 65 77 20  62 6f 75 6e 64 61 72 79  |ach new boundary|
000005a0  20 6f 66 20 69 74 65 72  61 74 69 6f 6e 73 2e 22  | of iterations."|
000005b0  27 0d 04 24 3a e7 4a 25  3d 43 25 2b 31 20 e5 8d  |'..$:.J%=C%+1 ..|
000005c0  44 56 44 20 8b 3a f1 27  22 4e 75 6d 62 65 72 20  |DVD .:.'"Number |
000005d0  6f 66 20 62 6f 75 6e 64  61 72 69 65 73 20 4f 4b  |of boundaries OK|
000005e0  20 28 59 2f 4e 29 22 3b  3a f2 51 0d 04 2e 18 e7  | (Y/N)";:.Q.....|
000005f0  41 24 3d 22 59 22 4a 25  3d 43 25 2b 31 3a e5 8d  |A$="Y"J%=C%+1:..|
00000600  44 56 44 0d 04 38 44 f1  22 48 6f 77 20 6d 61 6e  |DVD..8D."How man|
00000610  79 20 62 6f 75 6e 64 61  72 69 65 73 20 28 32 2d  |y boundaries (2-|
00000620  31 35 29 20 22 3b 3a 4a  25 3d a5 2d 34 38 3a f1  |15) ";:J%=.-48:.|
00000630  3b 4a 25 3b 3a e7 4a 25  3c 31 20 84 20 4a 25 3e  |;J%;:.J%<1 . J%>|
00000640  39 20 e5 8d 54 78 44 0d  04 42 21 e7 20 4a 25 3d  |9 ..TxD..B!. J%=|
00000650  31 3a 4b 25 3d a5 2d 34  38 3a f1 3b 4b 25 3b 3a  |1:K%=.-48:.;K%;:|
00000660  4a 25 3d 31 30 2b 4b 25  0d 04 47 12 e7 4a 25 3c  |J%=10+K%..G..J%<|
00000670  3e 43 25 2b 31 20 f2 62  6e 64 0d 04 4c 27 e7 4a  |>C%+1 .bnd..L'.J|
00000680  25 3c 32 20 84 20 4a 25  3e 31 35 20 e5 8d 54 6e  |%<2 . J%>15 ..Tn|
00000690  44 20 8b 20 43 25 3d 4a  25 2d 31 3a e5 8d 64 7c  |D . C%=J%-1:..d||
000006a0  43 0d 04 56 5b f1 27 22  57 68 69 63 68 20 63 6f  |C..V[.'"Which co|
000006b0  6c 6f 75 72 2f 62 6f 75  6e 64 20 74 6f 20 63 68  |lour/bound to ch|
000006c0  61 6e 67 65 3f 22 27 22  28 52 45 54 55 52 4e 20  |ange?"'"(RETURN |
000006d0  69 66 20 6e 6f 6e 65 29  22 3b 3a 4b 25 3d a5 2d  |if none)";:K%=.-|
000006e0  34 38 3a f1 3b 4b 25 3b  3a e7 20 4b 25 3d 30 20  |48:.;K%;:. K%=0 |
000006f0  84 20 4b 25 3d 2d 33 35  20 8c 20 e1 0d 04 60 30  |. K%=-35 . ...`0|
00000700  e7 4b 25 3d 31 20 80 20  4a 25 3e 39 20 49 25 3d  |.K%=1 . J%>9 I%=|
00000710  a5 2d 34 38 3a e7 20 49  25 3e 2d 33 35 20 4b 25  |.-48:. I%>-35 K%|
00000720  3d 31 30 2b 49 25 3a f1  3b 49 25 3b 0d 04 6a 12  |=10+I%:.;I%;..j.|
00000730  e7 20 4b 25 3e 4a 25 20  e5 20 8d 44 56 44 0d 04  |. K%>J% . .DVD..|
00000740  74 37 e7 4d 25 3d 32 f1  27 22 43 6f 6c 6f 75 72  |t7.M%=2.'"Colour|
00000750  73 20 61 72 65 3a 22 3a  e3 49 25 3d 30 b8 37 3a  |s are:":.I%=0.7:|
00000760  f1 3b 43 25 28 49 25 29  2b 22 20 22 3b 3a ed 3a  |.;C%(I%)+" ";:.:|
00000770  e5 8d 74 70 44 0d 04 7e  4f f1 27 22 42 61 63 6b  |..tpD..~O.'"Back|
00000780  67 72 6f 75 6e 64 20 63  6f 6c 6f 75 72 20 69 73  |ground colour is|
00000790  20 22 2b 43 24 28 4b 4f  4c 24 28 30 29 83 38 27  | "+C$(KOL$(0).8'|
000007a0  22 50 72 69 6e 74 69 6e  67 20 77 69 6c 6c 20 62  |"Printing will b|
000007b0  65 20 69 6e 20 22 2b 43  24 28 4b 4f 4c 25 28 33  |e in "+C$(KOL%(3|
000007c0  29 83 38 29 0d 04 88 49  f1 22 50 72 69 6d 61 72  |).8)...I."Primar|
000007d0  79 20 63 6f 6c 6f 75 72  73 20 61 76 61 69 6c 61  |y colours availa|
000007e0  62 6c 65 3a 22 3a e3 49  25 3d 30 b8 33 3a e7 4b  |ble:":.I%=0.3:.K|
000007f0  4f 4c 28 49 25 29 3e 31  36 20 f1 3b 43 24 28 4b  |OL(I%)>16 .;C$(K|
00000800  4f 4c 25 28 49 25 29 29  2b 22 20 22 3b 0d 04 92  |OL%(I%))+" ";...|
00000810  48 ed 3a f1 27 22 4f 74  68 65 72 20 70 6f 73 73  |H.:.'"Other poss|
00000820  69 62 6c 65 20 63 6f 6c  6f 75 72 73 3a 22 3a e3  |ible colours:":.|
00000830  49 25 3d 30 b8 37 3a 46  25 3d 30 3a e3 4e 25 3d  |I%=0.7:F%=0:.N%=|
00000840  30 b8 33 3a e7 4b 4f 4c  25 28 4e 25 29 3d 49 25  |0.3:.KOL%(N%)=I%|
00000850  20 46 25 3d 31 0d 04 9c  18 ed 3a e7 46 25 3d 30  | F%=1.....:.F%=0|
00000860  20 f1 3b 43 24 28 49 25  29 3b 89 31 3b 0d 04 a6  | .;C$(I%);.1;...|
00000870  05 ed 0d 04 b0 35 49 25  3d 31 30 3a e8 27 22 57  |.....5I%=10:.'"W|
00000880  68 69 63 68 20 63 6f 6c  6f 75 72 22 2c 41 24 3a  |hich colour",A$:|
00000890  e7 41 24 3d 22 22 e5 8d  54 72 45 20 8b 20 41 24  |.A$=""..TrE . A$|
000008a0  3d c0 41 24 2c 33 29 0d  04 ba 22 e3 4e 25 3d 30  |=.A$,3)...".N%=0|
000008b0  b8 37 3a e7 41 24 3d c0  43 24 28 4e 25 29 2c 32  |.7:.A$=.C$(N%),2|
000008c0  2c 33 29 20 49 25 3d 4e  25 0d 04 c4 05 ed 0d 04  |,3) I%=N%.......|
000008d0  ce 0f e7 49 25 3d 31 30  e5 8d 74 70 44 0d 04 d8  |...I%=10..tpD...|
000008e0  1d e7 4d 25 3d 32 20 3f  28 26 42 46 46 2b 4b 25  |..M%=2 ?(&BFF+K%|
000008f0  29 3d 49 25 3a e5 8d 54  68 45 0d 04 e2 32 46 25  |)=I%:..ThE...2F%|
00000900  3d 30 3a e3 4e 25 3d 30  b8 33 3a e7 49 25 3d 4b  |=0:.N%=0.3:.I%=K|
00000910  4f 4c 25 28 4e 25 29 20  3f 28 26 42 46 46 2b 4b  |OL%(N%) ?(&BFF+K|
00000920  25 29 29 3d 4e 25 3a 46  25 3d 2d 31 0d 04 ec 22  |%))=N%:F%=-1..."|
00000930  e7 46 25 3d 30 4b 4f 4c  25 28 3f 28 26 42 46 46  |.F%=0KOL%(?(&BFF|
00000940  2b 4b 25 29 29 3d 49 25  3a e5 8d 54 68 45 0d 04  |+K%))=I%:..ThE..|
00000950  f6 2e ed 3a e7 46 25 3e  30 4b 4f 4c 25 28 46 25  |...:.F%>0KOL%(F%|
00000960  2d 31 29 3d 49 25 3a 3f  28 26 42 46 46 2b 4b 25  |-1)=I%:?(&BFF+K%|
00000970  29 3d 46 25 2d 31 3a e5  8d 54 68 45 0d 05 00 22  |)=F%-1:..ThE..."|
00000980  e7 46 25 3d 30 4b 4f 4c  25 28 3f 28 26 42 46 46  |.F%=0KOL%(?(&BFF|
00000990  2b 4b 25 29 29 3d 49 25  3a e5 8d 54 68 45 0d 05  |+K%))=I%:..ThE..|
000009a0  0a 2d e3 49 25 3d 30 b8  33 3a 46 25 3d 30 3a e3  |.-.I%=0.3:F%=0:.|
000009b0  4e 25 3d 30 b8 43 25 3a  e7 3f 28 26 43 30 30 2b  |N%=0.C%:.?(&C00+|
000009c0  4e 25 29 3d 49 25 20 46  25 3d 31 0d 05 14 16 ed  |N%)=I% F%=1.....|
000009d0  3a e7 46 25 3d 30 4b 4f  4c 25 28 49 25 29 3d 31  |:.F%=0KOL%(I%)=1|
000009e0  36 0d 05 1e 05 ed 0d 05  28 0e e7 4b 25 3d 31 e5  |6.......(..K%=1.|
000009f0  8d 64 7c 43 0d 05 32 37  e8 22 57 68 61 74 20 6e  |.d|C..27."What n|
00000a00  65 77 20 69 74 65 72 61  74 69 6f 6e 20 66 6f 72  |ew iteration for|
00000a10  20 74 68 69 73 20 63 6f  6c 6f 75 72 22 2c 4c 25  | this colour",L%|
00000a20  3a e7 4c 25 3c 30 e5 8d  54 72 45 0d 05 3c 0f e7  |:.L%<0..TrE..<..|
00000a30  20 4c 25 3d 30 e5 8d 64  7c 43 0d 05 46 19 e7 4c  | L%=0..d|C..F..L|
00000a40  25 3c 3f 28 26 43 30 45  2b 4b 25 29 2b 31 e5 8d  |%<?(&C0E+K%)+1..|
00000a50  44 6e 45 0d 05 50 10 e7  4c 25 3e 32 35 35 e5 8d  |DnE..P..L%>255..|
00000a60  44 6e 45 0d 05 5a 22 e7  4b 25 3c 4a 25 20 80 20  |DnE..Z".K%<J% . |
00000a70  4c 25 3e 3f 28 26 43 31  30 2b 4b 25 29 2d 31 20  |L%>?(&C10+K%)-1 |
00000a80  e5 8d 44 6e 45 0d 05 64  17 3f 28 26 43 30 46 2b  |..DnE..d.?(&C0F+|
00000a90  4b 25 29 3d 4c 25 3a e5  8d 64 7c 43 0d 05 6e 2c  |K%)=L%:..d|C..n,|
00000aa0  f1 22 4e 65 77 20 72 61  6e 67 65 20 69 6e 63 6f  |."New range inco|
00000ab0  6d 70 61 74 69 62 6c 65  20 77 69 74 68 20 6f 6c  |mpatible with ol|
00000ac0  64 22 3a e5 8d 54 72 45  0d 05 78 05 3a 0d 05 82  |d":..TrE..x.:...|
00000ad0  0a dd f2 61 72 65 61 0d  05 8c 65 db 3a 40 25 3d  |...area...e.:@%=|
00000ae0  26 32 30 37 30 41 3a f1  27 27 22 4c 65 66 74 20  |&2070A:.''"Left |
00000af0  58 20 62 6f 75 6e 64 3d  22 58 4d 49 4e 3b 22 2c  |X bound="XMIN;",|
00000b00  20 77 69 64 74 68 3d 22  57 27 22 4c 6f 77 20 59  | width="W'"Low Y|
00000b10  20 62 6f 75 6e 64 3d 22  59 4d 49 4e 3b 22 2c 20  | bound="YMIN;", |
00000b20  68 65 69 67 68 74 3d 22  48 27 3a f2 61 73 6b 3a  |height="H':.ask:|
00000b30  e7 41 24 3d 22 59 22 8c  8d 74 7e 45 0d 05 96 16  |.A$="Y"..t~E....|
00000b40  e8 22 4e 65 77 20 6c 65  66 74 20 58 22 2c 58 4d  |."New left X",XM|
00000b50  49 4e 0d 05 a0 1c e8 22  4e 65 77 20 77 69 64 74  |IN....."New widt|
00000b60  68 22 2c 57 3a e7 57 3d  30 e5 8d 74 60 45 0d 05  |h",W:.W=0..t`E..|
00000b70  aa 18 e8 22 4e 65 77 20  62 6f 74 74 6f 6d 20 59  |..."New bottom Y|
00000b80  22 2c 59 4d 49 4e 0d 05  b4 1d e8 22 4e 65 77 20  |",YMIN....."New |
00000b90  68 65 69 67 68 74 22 2c  48 3a e7 48 3d 30 e5 8d  |height",H:.H=0..|
00000ba0  74 74 45 0d 05 be 45 4c  25 3d 32 35 36 2f 4d 25  |ttE...EL%=256/M%|
00000bb0  3a 52 3d 94 28 48 2f 57  29 3a e7 52 3e 31 20 59  |:R=.(H/W):.R>1 Y|
00000bc0  25 3d 4c 25 2d 31 3a 58  25 3d 59 25 2f 52 2b 30  |%=L%-1:X%=Y%/R+0|
00000bd0  2e 35 20 8b 20 58 25 3d  4c 25 2d 31 3a 59 25 3d  |.5 . X%=L%-1:Y%=|
00000be0  58 25 2a 52 2b 30 2e 35  0d 05 c8 59 40 25 3d 34  |X%*R+0.5...Y@%=4|
00000bf0  3a f1 27 22 54 68 65 20  70 6c 6f 74 20 77 69 6c  |:.'"The plot wil|
00000c00  6c 20 68 61 76 65 20 22  3b 58 25 2b 31 3b 22 20  |l have ";X%+1;" |
00000c10  63 6f 6c 75 6d 6e 73 22  27 22 61 6e 64 20 22 3b  |columns"'"and ";|
00000c20  59 25 2b 31 3b 22 20 72  6f 77 73 2e 22 27 27 3a  |Y%+1;" rows."'':|
00000c30  f2 61 73 6b 3a e7 41 24  3d 22 59 22 8c 8d 64 66  |.ask:.A$="Y"..df|
00000c40  45 0d 05 d2 60 f1 27 22  4e 65 77 20 6e 75 6d 62  |E...`.'"New numb|
00000c50  65 72 20 6f 66 20 63 6f  6c 75 6d 6e 73 20 28 20  |er of columns ( |
00000c60  3c 22 3b 4c 25 2b 31 22  20 29 22 3b 3a e8 2c 49  |<";L%+1" )";:.,I|
00000c70  25 3a e7 49 25 3c 31 20  84 20 49 25 3e 4c 25 20  |%:.I%<1 . I%>L% |
00000c80  f1 22 20 49 6c 6c 65 67  61 6c 20 76 61 6c 75 65  |." Illegal value|
00000c90  22 3a e5 8d 64 52 45 20  8b 20 58 25 3d 49 25 2d  |":..dRE . X%=I%-|
00000ca0  31 0d 05 dc 5c f1 22 4e  65 77 20 6e 75 6d 62 65  |1...\."New numbe|
00000cb0  72 20 6f 66 20 72 6f 77  73 20 28 20 3c 22 3b 4c  |r of rows ( <";L|
00000cc0  25 2b 31 22 20 29 22 3b  3a e8 2c 49 25 3a e7 49  |%+1" )";:.,I%:.I|
00000cd0  25 3c 31 20 84 20 49 25  3e 4c 25 20 f1 22 20 49  |%<1 . I%>L% ." I|
00000ce0  6c 6c 65 67 61 6c 20 76  61 6c 75 65 22 3a e5 8d  |llegal value":..|
00000cf0  64 52 45 20 8b 20 59 25  3d 49 25 2d 31 0d 05 e6  |dRE . Y%=I%-1...|
00000d00  15 44 58 3d 57 2f 58 25  3a 44 59 3d 48 2f 59 25  |.DX=W/X%:DY=H/Y%|
00000d10  3a e1 0d 05 f0 05 3a 0d  05 fa 09 dd f2 61 73 6b  |:.....:......ask|
00000d20  0d 06 04 0d 2a 46 58 32  30 32 2c 34 30 0d 06 0e  |....*FX202,40...|
00000d30  1e f1 3b 22 20 49 73 20  74 68 69 73 20 4f 4b 20  |..;" Is this OK |
00000d40  28 59 2f 4e 29 22 3b f2  51 3a e1 0d 06 18 0e dd  |(Y/N)";.Q:......|
00000d50  f2 51 3a f1 3b 22 3f 22  3b 0d 06 22 28 41 24 3d  |.Q:.;"?";.."(A$=|
00000d60  bd 28 a5 20 80 20 32 32  33 29 3a e7 41 24 3c 3e  |.(. . 223):.A$<>|
00000d70  22 59 22 80 20 41 24 3c  3e 22 4e 22 e5 8d 54 62  |"Y". A$<>"N"..Tb|
00000d80  46 0d 06 2c 0a f1 3b 41  24 3a e1 0d 06 36 05 3a  |F..,..;A$:...6.:|
00000d90  0d 06 40 0a dd f2 6d 6f  64 65 0d 06 4a 0f 54 25  |..@...mode..J.T%|
00000da0  3d 2d 31 3a 40 25 3d 31  30 0d 06 54 27 db 3a f1  |=-1:@%=10..T'.:.|
00000db0  8a 37 2c 31 29 bd 31 33  34 22 54 68 65 20 4d 61  |.7,1).134"The Ma|
00000dc0  6e 64 65 6c 62 72 6f 74  20 53 65 74 22 27 27 27  |ndelbrot Set"'''|
00000dd0  0d 06 5e aa f1 22 54 68  65 72 65 20 61 72 65 20  |..^.."There are |
00000de0  74 77 6f 20 61 76 61 69  6c 61 62 6c 65 20 70 6c  |two available pl|
00000df0  6f 74 20 6d 6f 64 65 73  3a 22 27 27 22 31 29 22  |ot modes:"''"1)"|
00000e00  2b bd 31 33 31 2b 22 48  69 67 68 20 72 65 73 6f  |+.131+"High reso|
00000e10  6c 75 74 69 6f 6e 20 28  32 35 36 20 6c 69 6e 65  |lution (256 line|
00000e20  73 29 20 61 6e 64 22 27  22 66 6f 75 72 20 63 6f  |s) and"'"four co|
00000e30  6c 6f 75 72 73 2c 22 27  27 22 32 29 20 4c 6f 77  |lours,"''"2) Low|
00000e40  20 72 65 73 6f 6c 75 74  69 6f 6e 20 28 31 32 38  | resolution (128|
00000e50  20 6c 69 6e 65 73 29 20  61 6e 64 22 27 bd 31 33  | lines) and"'.13|
00000e60  31 2b 22 65 69 67 68 74  22 2b bd 31 33 35 2b 22  |1+"eight"+.135+"|
00000e70  63 6f 6c 6f 75 72 73 2e  22 27 0d 06 68 44 e7 4d  |colours."'..hD.M|
00000e80  25 3d 30 20 f1 27 22 57  68 69 63 68 20 6d 6f 64  |%=0 .'"Which mod|
00000e90  65 20 77 6f 75 6c 64 20  79 6f 75 20 6c 69 6b 65  |e would you like|
00000ea0  20 28 31 20 6f 72 20 32  29 3f 20 22 3b 3a 4d 25  | (1 or 2)? ";:M%|
00000eb0  3d a5 2d 34 38 20 8b 20  e5 20 8d 44 7c 46 0d ff  |=.-48 . . .D|F..|
00000ec0
Graphics/Mandelbrot.m0
Graphics/Mandelbrot.m1
Graphics/Mandelbrot.m2
Graphics/Mandelbrot.m4
Graphics/Mandelbrot.m5