Home » Personal collection » Acorn ADFS disks » Greaseweazled » adfs_Programs.adf » Graphics/MANDEL2

Graphics/MANDEL2

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 » Greaseweazled » adfs_Programs.adf
Filename: Graphics/MANDEL2
Read OK:
File size: 1583 bytes
Load address: FFFFFB46
Exec address: 3259E934
Duplicates

There are 5 duplicate copies of this file in the archive:

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-M%*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
 1650IFM%<1ORM%>2M%=0:GOTO1640ELSEPRINT;M%:GOTO1670
 1660PRINT"Plot mode will be"+CHR$134;M%;CHR$135;:PROCask:IFA$="N"M%=3-M%:GOTO1660
 1670ONM%GOTO1680,1690
 1680G%=32:H%=39:C%=3:FORI%=0TO15:?(I%+&C10)=4*I%:?(I%+&C00)=(I%+1)MOD4:NEXT:KOL%(0)=0:KOL%(1)=4:KOL%(2)=6:KOL%(3)=7:ENDPROC
 1690G%=16:H%=19:C%=7:FORI%=0TO15:?(I%+&C10)=2*I%:NEXT:!&C00=&02050104:!&0C04=&00070306:!&C08=&02050104:!&C0C=&08070306:ENDPROC
 1700:
 1710DEFPROCrule
 1720CLS:@%=10:PRINT''"The Mandlebrot formula used will be:"''"    Z^";T%+3;" + C => Z'"'':PROCask:IFA$="Y"GOTO1750
 1730PRINT'"Enter new exponent (2-4) ";:I%=GET-48:PRINT;I%:IFI%<2ORI%>4PRINT"Illegal value":GOTO1730
 1740T%=I%-3:GOTO1720
 1750ONT%+2GOTO1760,1770,1780
 1760XMIN=-2:YMIN=-1.25:W=2.5:H=W:ENDPROC
 1770XMIN=-1.5:YMIN=-1.5:W=3:H=3:ENDPROC
 1780XMIN=-1.5:YMIN=-1.25:W=2.5:H=W:ENDPROC
 1790:
 1800DEFPROCbox
 1810CLS:PRINT"BOX Y/N";:PROCQ:IFA$="N"ENDPROC
 1820CLS:S%=4*M%:U%=0:V%=0:A%=640:B%=512:GCOL3,3:MOVEU%,V%:DRAWA%,B%
 1830*FX4,1
 1840*FX12,4
 1850A$=GET$:REPEAT:PROCbx:UNTILA$="Q"
 1860*FX4,0
 1870*FX12,0
 1880CLS:PROCask:MOVEU%,V%:DRAWU%,B%:DRAWA%,B%:DRAWA%,V%:DRAWU%,V%:IFA$="N"GOTO1820
 1890CLS:PRINT"Draw new one";:PROCQ:IFA$="N"ENDPROC
 1900XMIN=XMIN+DX*U%/S%:YMIN=YMIN+DY*V%/S%:W=(A%-U%)*DX/S%:H=(B%-V%)*DY/S%:ENDPROC
 1910ENDPROC
 1920:
 1930DEFPROCbx
 1940IFINSTR("LR",A$)=0A$=GET$:ENDPROC
 1950MOVEU%,V%:DRAWA%,B%:IFA$="L"U%=A%:V%=B%ELSEIFA$="R"MOVEU%,V%:DRAWU%,B%:DRAWA%,B%:DRAWA%,V%:DRAWU%,V%:A$="Q":ENDPROC
 1960IFA$=CHR$136A%=A%-S%ELSEIFA$=CHR$137A%=A%+S%ELSEIFA$=CHR$139B%=B%+S%ELSEIFA$=CHR$138B%=B%-S%
 1970 MOVEU%,V%:DRAWA%,B%:A$=GET$:ENDPROC
 1980:
 1990DEFPROCmandel(XMIN,YMIN,DX,DY):P%=C%?&C10:L%=M%*4
 2000Y=YMIN-DY:FORV%=0TOY%:PRINTV%:Y=Y+DY:X=XMIN-DX:FORU%=0TOX%:X=X+DX:U=X:V=X:N%=0
 2010ONT%+2GOTO2020,2030,2040
 2020A=U*U:B=V*V:IFA+B>4GOTO2050ELSEN%=N%+1:IFN%=P%GOTO2050ELSEV=Y+2*U*V:U=X+A-B:GOTO2020
 2030A=U*U:B=V*V:IFA+B>2GOTO2050ELSEN%=N%+1:IFN%=P%GOTO2050ELSEV=Y+V*(3*A-B):U=X+U*(A-3*B):GOTO2030
 2040A=U*U:B=V*V:IFA+B>2GOTO2050ELSEN%=N%+1:IFN%=P%GOTO2050ELSEV=Y+4*U*V*(A-B):U=X+A*A+B*B-6*A*B:GOTO2040
 2050J%=C%?&C00:FORI%=C%TO1STEP-1:IFN%<I%?&C10 J%=I%?&BFF
 2060NEXT:GCOL0,J%:PLOT69,U%*L%,V%*L%:IFM%=2PLOT69,U%*L%,V%*L%+4
 2070 NEXT,:ENDPROC

� 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-M%*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
~P�'"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
�1F%=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
r#�M%<1�M%>2M%=0:�DhF��;M%:�tFF
|@�"Plot mode will be"+�134;M%;�135;:�ask:�A$="N"M%=3-M%:�D|F
��M%�tPF,�tZF
�mG%=32:H%=39:C%=3:�I%=0�15:?(I%+&C10)=4*I%:?(I%+&C00)=(I%+1)�4:�:KOL%(0)=0:KOL%(1)=4:KOL%(2)=6:KOL%(3)=7:�
�rG%=16:H%=19:C%=7:�I%=0�15:?(I%+&C10)=2*I%:�:!&C00=&02050104:!&0C04=&00070306:!&C08=&02050104:!&C0C=&08070306:�
�:
�
��rule
�e�:@%=10:�''"The Mandlebrot formula used will be:"''"    Z^";T%+3;" + C => Z'"'':�ask:�A$="Y"�dVF
�P�'"Enter new exponent (2-4) ";:I%=�-48:�;I%:�I%<2�I%>4�"Illegal value":�dBF
�T%=I%-3:�txF
��T%+2�d`F,�djF,�dtF
�"XMIN=-2:YMIN=-1.25:W=2.5:H=W:�
�!XMIN=-1.5:YMIN=-1.5:W=3:H=3:�
�$XMIN=-1.5:YMIN=-1.25:W=2.5:H=W:�
�:
	��box
�:�"BOX Y/N";:�Q:�A$="N"�
8�:S%=4*M%:U%=0:V%=0:A%=640:B%=512:�3,3:�U%,V%:�A%,B%
&
*FX4,1
0*FX12,4
:A$=�:�:�bx:�A$="Q"
D
*FX4,0
N*FX12,0
X:�:�ask:�U%,V%:�U%,B%:�A%,B%:�A%,V%:�U%,V%:�A$="N"�T\G
b"�:�"Draw new one";:�Q:�A$="N"�
lKXMIN=XMIN+DX*U%/S%:YMIN=YMIN+DY*V%/S%:W=(A%-U%)*DX/S%:H=(B%-V%)*DY/S%:�
v�
�:
���bx
��"LR",A$)=0A$=�:�
�W�U%,V%:�A%,B%:�A$="L"U%=A%:V%=B%��A$="R"�U%,V%:�U%,B%:�A%,B%:�A%,V%:�U%,V%:A$="Q":�
�G�A$=�136A%=A%-S%��A$=�137A%=A%+S%��A$=�139B%=B%+S%��A$=�138B%=B%-S%
� �U%,V%:�A%,B%:A$=�:�
�:
�0��mandel(XMIN,YMIN,DX,DY):P%=C%?&C10:L%=M%*4
�HY=YMIN-DY:�V%=0�Y%:�V%:Y=Y+DY:X=XMIN-DX:�U%=0�X%:X=X+DX:U=X:V=X:N%=0
��T%+2�ddG,�dnG,�dxG
�GA=U*U:B=V*V:�A+B>4�TBH�N%=N%+1:�N%=P%�TBH�V=Y+2*U*V:U=X+A-B:�ddG
�QA=U*U:B=V*V:�A+B>2�TBH�N%=N%+1:�N%=P%�TBH�V=Y+V*(3*A-B):U=X+U*(A-3*B):�dnG
�WA=U*U:B=V*V:�A+B>2�TBH�N%=N%+1:�N%=P%�TBH�V=Y+4*U*V*(A-B):U=X+A*A+B*B-6*A*B:�dxG
1J%=C%?&C00:�I%=C%�1�-1:�N%<I%?&C10 J%=I%?&BFF
2�:�0,J%:�69,U%*L%,V%*L%:�M%=2�69,U%*L%,V%*L%+4
	 �,:�
�
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  99 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 26 31  30 33 30 38 3a f1 48 3a  |N;:@%=&10308:.H:|
00000250  40 25 3d 31 31 2d 4d 25  2a 34 3a e3 49 25 3d 30  |@%=11-M%*4:.I%=0|
00000260  b8 43 25 3a f1 3f 28 26  43 31 30 2b 49 25 29 3b  |.C%:.?(&C10+I%);|
00000270  3a fb 3f 28 26 43 30 30  2b 49 25 29 3a ef 32 35  |:.?(&C00+I%):.25|
00000280  35 3a fb 37 3a ed 3a 40  25 3d 38 2f 4d 25 0d 00  |5:.7:.:@%=8/M%..|
00000290  dc 28 45 25 3d 36 3a ef  34 2c 32 33 3b 38 32 30  |.(E%=6:.4,23;820|
000002a0  32 3b 30 3b 30 3b 30 3b  32 38 2c 47 25 2c 33 31  |2;0;0;0;28,G%,31|
000002b0  2c 48 25 2c 32 39 0d 00  e6 1c f2 6d 61 6e 64 65  |,H%,29.....mande|
000002c0  6c 28 58 4d 49 4e 2c 59  4d 49 4e 2c 44 58 2c 44  |l(XMIN,YMIN,DX,D|
000002d0  59 29 0d 00 f0 1e 45 25  3d 35 3a ef 37 2c 34 2c  |Y)....E%=5:.7,4,|
000002e0  32 38 2c 47 25 2c 33 31  2c 48 25 2c 32 36 3a db  |28,G%,31,H%,26:.|
000002f0  0d 00 fa 36 f1 22 53 61  76 65 20 59 2f 4e 22 3b  |...6."Save Y/N";|
00000300  3a f2 51 3a e7 41 24 3d  22 59 22 e8 22 46 69 6c  |:.Q:.A$="Y"."Fil|
00000310  65 6e 61 6d 65 22 2c 46  24 3a e5 8d 54 44 41 20  |ename",F$:..TDA |
00000320  8b 20 8d 54 76 41 0d 01  04 27 e7 a7 46 24 2c 22  |. .TvA...'..F$,"|
00000330  22 22 22 29 3c 3e 30 e5  8d 64 7a 40 20 8b 20 e7  |""")<>0..dz@ . .|
00000340  20 a9 28 46 24 29 3e 36  e5 8d 64 7a 40 0d 01 0e  | .(F$)>6..dz@...|
00000350  1b 46 24 3d 22 50 2e 22  2b c3 28 4d 25 2b 32 2b  |.F$="P."+.(M%+2+|
00000360  32 2a 54 25 29 2b 46 24  0d 01 18 2b e7 4d 25 3d  |2*T%)+F$...+.M%=|
00000370  31 20 e3 49 25 3d 30 b8  33 3a 3f 28 49 25 2b 26  |1 .I%=0.3:?(I%+&|
00000380  37 46 46 43 29 3d 4b 4f  4c 25 28 49 25 29 83 31  |7FFC)=KOL%(I%).1|
00000390  36 3a ed 0d 01 22 21 24  26 43 38 30 3d 22 53 41  |6:..."!$&C80="SA|
000003a0  56 45 20 22 2b 46 24 2b  22 20 33 30 30 30 20 38  |VE "+F$+" 3000 8|
000003b0  30 30 30 22 0d 01 2c 2f  55 25 3d 58 25 3a 56 25  |000"..,/U%=X%:V%|
000003c0  3d 59 25 3a 58 25 3d 26  38 30 3a 59 25 3d 26 43  |=Y%:X%=&80:Y%=&C|
000003d0  3a d6 26 46 46 46 37 3a  58 25 3d 55 25 3a 59 25  |:.&FFF7:X%=U%:Y%|
000003e0  3d 56 25 0d 01 36 18 f2  62 6f 78 3a e7 41 24 3d  |=V%..6..box:.A$=|
000003f0  22 59 22 eb 37 3a e5 8d  74 6a 40 0d 01 40 23 db  |"Y".7:..tj@..@#.|
00000400  3a f1 22 4d 4f 52 45 20  59 2f 4e 22 3b 3a f2 51  |:."MORE Y/N";:.Q|
00000410  3a e7 20 41 24 3d 22 59  22 e5 8d 74 74 40 0d 01  |:. A$="Y"..tt@..|
00000420  4a 08 eb 37 3a e0 0d 01  54 17 e7 45 25 3c 3e 35  |J..7:...T..E%<>5|
00000430  84 9f 3c 31 39 30 20 e5  20 8d 44 68 41 0d 01 5e  |..<190 . .DhA..^|
00000440  1c f1 22 46 49 4c 49 4e  47 20 45 52 52 4f 52 20  |.."FILING ERROR |
00000450  22 3b 9f 3a e5 8d 64 7a  40 0d 01 68 21 e7 20 9f  |";.:..dz@..h!. .|
00000460  3c 3e 31 37 20 eb 37 3a  f6 3a f1 22 20 41 54 20  |<>17 .7:.:." AT |
00000470  4c 49 4e 45 20 22 3b 9e  3a e0 0d 01 72 28 ee 20  |LINE ";.:...r(. |
00000480  45 25 20 e5 20 8d 44 7c  41 2c 8d 74 56 40 2c 8d  |E% . .D|A,.tV@,.|
00000490  74 60 40 2c 8d 74 6a 40  2c 8d 74 74 40 2c 8d 64  |t`@,.tj@,.tt@,.d|
000004a0  70 40 0d 01 7c 09 eb 20  37 3a e0 0d 01 86 05 3a  |p@..|.. 7:.....:|
000004b0  0d 03 e8 0a dd f2 6b 6f  6c 73 0d 03 f2 08 4a 25  |......kols....J%|
000004c0  3d 30 0d 03 fc 25 db 3a  f1 27 27 22 4e 55 4d 42  |=0...%.:.''"NUMB|
000004d0  45 52 20 43 4f 4c 4f 55  52 20 20 4c 4f 57 45 52  |ER COLOUR  LOWER|
000004e0  20 42 4f 55 4e 44 22 0d  04 06 31 40 25 3d 36 3a  | BOUND"...1@%=6:|
000004f0  e3 49 25 3d 30 b8 43 25  3a 4b 25 3d 3f 28 26 43  |.I%=0.C%:K%=?(&C|
00000500  30 30 2b 49 25 29 3a e7  4d 25 3d 31 20 4b 25 3d  |00+I%):.M%=1 K%=|
00000510  4b 4f 4c 25 28 4b 25 29  0d 04 10 49 f1 20 49 25  |KOL%(K%)...I. I%|
00000520  2b 31 3b 3a e7 4b 25 3e  30 f1 22 20 20 20 22 2b  |+1;:.K%>0."   "+|
00000530  bd 28 31 32 38 2b 4b 25  29 2b bd 32 35 35 2b bd  |.(128+K%)+.255+.|
00000540  31 33 35 2c 3f 28 26 43  31 30 2b 49 25 29 20 8b  |135,?(&C10+I%) .|
00000550  20 f1 89 28 36 29 2c 3f  28 26 43 31 30 2b 49 25  | ..(6),?(&C10+I%|
00000560  29 0d 04 1a 52 ed 3a f1  22 54 68 65 73 65 20 61  |)...R.:."These a|
00000570  72 65 20 74 68 65 20 63  6f 6c 6f 75 72 73 20 74  |re the colours t|
00000580  6f 20 62 65 20 70 6c 6f  74 74 65 64 20 66 6f 72  |o be plotted for|
00000590  20 65 61 63 68 20 6e 65  77 20 62 6f 75 6e 64 61  | each new bounda|
000005a0  72 79 20 6f 66 20 69 74  65 72 61 74 69 6f 6e 73  |ry of iterations|
000005b0  2e 22 27 0d 04 24 3a e7  4a 25 3d 43 25 2b 31 20  |."'..$:.J%=C%+1 |
000005c0  e5 8d 44 56 44 20 8b 3a  f1 27 22 4e 75 6d 62 65  |..DVD .:.'"Numbe|
000005d0  72 20 6f 66 20 62 6f 75  6e 64 61 72 69 65 73 20  |r of boundaries |
000005e0  4f 4b 20 28 59 2f 4e 29  22 3b 3a f2 51 0d 04 2e  |OK (Y/N)";:.Q...|
000005f0  18 e7 41 24 3d 22 59 22  4a 25 3d 43 25 2b 31 3a  |..A$="Y"J%=C%+1:|
00000600  e5 8d 44 56 44 0d 04 38  44 f1 22 48 6f 77 20 6d  |..DVD..8D."How m|
00000610  61 6e 79 20 62 6f 75 6e  64 61 72 69 65 73 20 28  |any boundaries (|
00000620  32 2d 31 35 29 20 22 3b  3a 4a 25 3d a5 2d 34 38  |2-15) ";:J%=.-48|
00000630  3a f1 3b 4a 25 3b 3a e7  4a 25 3c 31 20 84 20 4a  |:.;J%;:.J%<1 . J|
00000640  25 3e 39 20 e5 8d 54 78  44 0d 04 42 21 e7 20 4a  |%>9 ..TxD..B!. J|
00000650  25 3d 31 3a 4b 25 3d a5  2d 34 38 3a f1 3b 4b 25  |%=1:K%=.-48:.;K%|
00000660  3b 3a 4a 25 3d 31 30 2b  4b 25 0d 04 47 12 e7 4a  |;:J%=10+K%..G..J|
00000670  25 3c 3e 43 25 2b 31 20  f2 62 6e 64 0d 04 4c 27  |%<>C%+1 .bnd..L'|
00000680  e7 4a 25 3c 32 20 84 20  4a 25 3e 31 35 20 e5 8d  |.J%<2 . J%>15 ..|
00000690  54 6e 44 20 8b 20 43 25  3d 4a 25 2d 31 3a e5 8d  |TnD . C%=J%-1:..|
000006a0  64 7c 43 0d 04 56 5b f1  27 22 57 68 69 63 68 20  |d|C..V[.'"Which |
000006b0  63 6f 6c 6f 75 72 2f 62  6f 75 6e 64 20 74 6f 20  |colour/bound to |
000006c0  63 68 61 6e 67 65 3f 22  27 22 28 52 45 54 55 52  |change?"'"(RETUR|
000006d0  4e 20 69 66 20 6e 6f 6e  65 29 22 3b 3a 4b 25 3d  |N if none)";:K%=|
000006e0  a5 2d 34 38 3a f1 3b 4b  25 3b 3a e7 20 4b 25 3d  |.-48:.;K%;:. K%=|
000006f0  30 20 84 20 4b 25 3d 2d  33 35 20 8c 20 e1 0d 04  |0 . K%=-35 . ...|
00000700  60 30 e7 4b 25 3d 31 20  80 20 4a 25 3e 39 20 49  |`0.K%=1 . J%>9 I|
00000710  25 3d a5 2d 34 38 3a e7  20 49 25 3e 2d 33 35 20  |%=.-48:. I%>-35 |
00000720  4b 25 3d 31 30 2b 49 25  3a f1 3b 49 25 3b 0d 04  |K%=10+I%:.;I%;..|
00000730  6a 12 e7 20 4b 25 3e 4a  25 20 e5 20 8d 44 56 44  |j.. K%>J% . .DVD|
00000740  0d 04 74 37 e7 4d 25 3d  32 f1 27 22 43 6f 6c 6f  |..t7.M%=2.'"Colo|
00000750  75 72 73 20 61 72 65 3a  22 3a e3 49 25 3d 30 b8  |urs are:":.I%=0.|
00000760  37 3a f1 3b 43 25 28 49  25 29 2b 22 20 22 3b 3a  |7:.;C%(I%)+" ";:|
00000770  ed 3a e5 8d 74 70 44 0d  04 7e 50 f1 27 22 42 61  |.:..tpD..~P.'"Ba|
00000780  63 6b 67 72 6f 75 6e 64  20 63 6f 6c 6f 75 72 20  |ckground colour |
00000790  69 73 20 22 2b 43 24 28  4b 4f 4c 24 28 30 29 83  |is "+C$(KOL$(0).|
000007a0  38 29 27 22 50 72 69 6e  74 69 6e 67 20 77 69 6c  |8)'"Printing wil|
000007b0  6c 20 62 65 20 69 6e 20  22 2b 43 24 28 4b 4f 4c  |l be in "+C$(KOL|
000007c0  25 28 33 29 83 38 29 0d  04 88 49 f1 22 50 72 69  |%(3).8)...I."Pri|
000007d0  6d 61 72 79 20 63 6f 6c  6f 75 72 73 20 61 76 61  |mary colours ava|
000007e0  69 6c 61 62 6c 65 3a 22  3a e3 49 25 3d 30 b8 33  |ilable:":.I%=0.3|
000007f0  3a e7 4b 4f 4c 28 49 25  29 3e 31 36 20 f1 3b 43  |:.KOL(I%)>16 .;C|
00000800  24 28 4b 4f 4c 25 28 49  25 29 29 2b 22 20 22 3b  |$(KOL%(I%))+" ";|
00000810  0d 04 92 48 ed 3a f1 27  22 4f 74 68 65 72 20 70  |...H.:.'"Other p|
00000820  6f 73 73 69 62 6c 65 20  63 6f 6c 6f 75 72 73 3a  |ossible colours:|
00000830  22 3a e3 49 25 3d 30 b8  37 3a 46 25 3d 30 3a e3  |":.I%=0.7:F%=0:.|
00000840  4e 25 3d 30 b8 33 3a e7  4b 4f 4c 25 28 4e 25 29  |N%=0.3:.KOL%(N%)|
00000850  3d 49 25 20 46 25 3d 31  0d 04 9c 18 ed 3a e7 46  |=I% F%=1.....:.F|
00000860  25 3d 30 20 f1 3b 43 24  28 49 25 29 3b 89 31 3b  |%=0 .;C$(I%);.1;|
00000870  0d 04 a6 05 ed 0d 04 b0  35 49 25 3d 31 30 3a e8  |........5I%=10:.|
00000880  27 22 57 68 69 63 68 20  63 6f 6c 6f 75 72 22 2c  |'"Which colour",|
00000890  41 24 3a e7 41 24 3d 22  22 e5 8d 54 72 45 20 8b  |A$:.A$=""..TrE .|
000008a0  20 41 24 3d c0 41 24 2c  33 29 0d 04 ba 22 e3 4e  | A$=.A$,3)...".N|
000008b0  25 3d 30 b8 37 3a e7 41  24 3d c0 43 24 28 4e 25  |%=0.7:.A$=.C$(N%|
000008c0  29 2c 32 2c 33 29 20 49  25 3d 4e 25 0d 04 c4 05  |),2,3) I%=N%....|
000008d0  ed 0d 04 ce 0f e7 49 25  3d 31 30 e5 8d 74 70 44  |......I%=10..tpD|
000008e0  0d 04 d8 1d e7 4d 25 3d  32 20 3f 28 26 42 46 46  |.....M%=2 ?(&BFF|
000008f0  2b 4b 25 29 3d 49 25 3a  e5 8d 54 68 45 0d 04 e2  |+K%)=I%:..ThE...|
00000900  31 46 25 3d 30 3a e3 4e  25 3d 30 b8 33 3a e7 49  |1F%=0:.N%=0.3:.I|
00000910  25 3d 4b 4f 4c 25 28 4e  25 29 20 3f 28 26 42 46  |%=KOL%(N%) ?(&BF|
00000920  46 2b 4b 25 29 3d 4e 25  3a 46 25 3d 2d 31 0d 04  |F+K%)=N%:F%=-1..|
00000930  ec 22 e7 46 25 3d 30 4b  4f 4c 25 28 3f 28 26 42  |.".F%=0KOL%(?(&B|
00000940  46 46 2b 4b 25 29 29 3d  49 25 3a e5 8d 54 68 45  |FF+K%))=I%:..ThE|
00000950  0d 04 f6 2e ed 3a e7 46  25 3e 30 4b 4f 4c 25 28  |.....:.F%>0KOL%(|
00000960  46 25 2d 31 29 3d 49 25  3a 3f 28 26 42 46 46 2b  |F%-1)=I%:?(&BFF+|
00000970  4b 25 29 3d 46 25 2d 31  3a e5 8d 54 68 45 0d 05  |K%)=F%-1:..ThE..|
00000980  00 22 e7 46 25 3d 30 4b  4f 4c 25 28 3f 28 26 42  |.".F%=0KOL%(?(&B|
00000990  46 46 2b 4b 25 29 29 3d  49 25 3a e5 8d 54 68 45  |FF+K%))=I%:..ThE|
000009a0  0d 05 0a 2d e3 49 25 3d  30 b8 33 3a 46 25 3d 30  |...-.I%=0.3:F%=0|
000009b0  3a e3 4e 25 3d 30 b8 43  25 3a e7 3f 28 26 43 30  |:.N%=0.C%:.?(&C0|
000009c0  30 2b 4e 25 29 3d 49 25  20 46 25 3d 31 0d 05 14  |0+N%)=I% F%=1...|
000009d0  16 ed 3a e7 46 25 3d 30  4b 4f 4c 25 28 49 25 29  |..:.F%=0KOL%(I%)|
000009e0  3d 31 36 0d 05 1e 05 ed  0d 05 28 0e e7 4b 25 3d  |=16.......(..K%=|
000009f0  31 e5 8d 64 7c 43 0d 05  32 37 e8 22 57 68 61 74  |1..d|C..27."What|
00000a00  20 6e 65 77 20 69 74 65  72 61 74 69 6f 6e 20 66  | new iteration f|
00000a10  6f 72 20 74 68 69 73 20  63 6f 6c 6f 75 72 22 2c  |or this colour",|
00000a20  4c 25 3a e7 4c 25 3c 30  e5 8d 54 72 45 0d 05 3c  |L%:.L%<0..TrE..<|
00000a30  0f e7 20 4c 25 3d 30 e5  8d 64 7c 43 0d 05 46 19  |.. L%=0..d|C..F.|
00000a40  e7 4c 25 3c 3f 28 26 43  30 45 2b 4b 25 29 2b 31  |.L%<?(&C0E+K%)+1|
00000a50  e5 8d 44 6e 45 0d 05 50  10 e7 4c 25 3e 32 35 35  |..DnE..P..L%>255|
00000a60  e5 8d 44 6e 45 0d 05 5a  22 e7 4b 25 3c 4a 25 20  |..DnE..Z".K%<J% |
00000a70  80 20 4c 25 3e 3f 28 26  43 31 30 2b 4b 25 29 2d  |. L%>?(&C10+K%)-|
00000a80  31 20 e5 8d 44 6e 45 0d  05 64 17 3f 28 26 43 30  |1 ..DnE..d.?(&C0|
00000a90  46 2b 4b 25 29 3d 4c 25  3a e5 8d 64 7c 43 0d 05  |F+K%)=L%:..d|C..|
00000aa0  6e 2c f1 22 4e 65 77 20  72 61 6e 67 65 20 69 6e  |n,."New range in|
00000ab0  63 6f 6d 70 61 74 69 62  6c 65 20 77 69 74 68 20  |compatible with |
00000ac0  6f 6c 64 22 3a e5 8d 54  72 45 0d 05 78 05 3a 0d  |old":..TrE..x.:.|
00000ad0  05 82 0a dd f2 61 72 65  61 0d 05 8c 65 db 3a 40  |.....area...e.:@|
00000ae0  25 3d 26 32 30 37 30 41  3a f1 27 27 22 4c 65 66  |%=&2070A:.''"Lef|
00000af0  74 20 58 20 62 6f 75 6e  64 3d 22 58 4d 49 4e 3b  |t X bound="XMIN;|
00000b00  22 2c 20 77 69 64 74 68  3d 22 57 27 22 4c 6f 77  |", width="W'"Low|
00000b10  20 59 20 62 6f 75 6e 64  3d 22 59 4d 49 4e 3b 22  | Y bound="YMIN;"|
00000b20  2c 20 68 65 69 67 68 74  3d 22 48 27 3a f2 61 73  |, height="H':.as|
00000b30  6b 3a e7 41 24 3d 22 59  22 8c 8d 74 7e 45 0d 05  |k:.A$="Y"..t~E..|
00000b40  96 16 e8 22 4e 65 77 20  6c 65 66 74 20 58 22 2c  |..."New left X",|
00000b50  58 4d 49 4e 0d 05 a0 1c  e8 22 4e 65 77 20 77 69  |XMIN....."New wi|
00000b60  64 74 68 22 2c 57 3a e7  57 3d 30 e5 8d 74 60 45  |dth",W:.W=0..t`E|
00000b70  0d 05 aa 18 e8 22 4e 65  77 20 62 6f 74 74 6f 6d  |....."New bottom|
00000b80  20 59 22 2c 59 4d 49 4e  0d 05 b4 1d e8 22 4e 65  | Y",YMIN....."Ne|
00000b90  77 20 68 65 69 67 68 74  22 2c 48 3a e7 48 3d 30  |w height",H:.H=0|
00000ba0  e5 8d 74 74 45 0d 05 be  45 4c 25 3d 32 35 36 2f  |..ttE...EL%=256/|
00000bb0  4d 25 3a 52 3d 94 28 48  2f 57 29 3a e7 52 3e 31  |M%:R=.(H/W):.R>1|
00000bc0  20 59 25 3d 4c 25 2d 31  3a 58 25 3d 59 25 2f 52  | Y%=L%-1:X%=Y%/R|
00000bd0  2b 30 2e 35 20 8b 20 58  25 3d 4c 25 2d 31 3a 59  |+0.5 . X%=L%-1:Y|
00000be0  25 3d 58 25 2a 52 2b 30  2e 35 0d 05 c8 59 40 25  |%=X%*R+0.5...Y@%|
00000bf0  3d 34 3a f1 27 22 54 68  65 20 70 6c 6f 74 20 77  |=4:.'"The plot w|
00000c00  69 6c 6c 20 68 61 76 65  20 22 3b 58 25 2b 31 3b  |ill have ";X%+1;|
00000c10  22 20 63 6f 6c 75 6d 6e  73 22 27 22 61 6e 64 20  |" columns"'"and |
00000c20  22 3b 59 25 2b 31 3b 22  20 72 6f 77 73 2e 22 27  |";Y%+1;" rows."'|
00000c30  27 3a f2 61 73 6b 3a e7  41 24 3d 22 59 22 8c 8d  |':.ask:.A$="Y"..|
00000c40  64 66 45 0d 05 d2 60 f1  27 22 4e 65 77 20 6e 75  |dfE...`.'"New nu|
00000c50  6d 62 65 72 20 6f 66 20  63 6f 6c 75 6d 6e 73 20  |mber of columns |
00000c60  28 20 3c 22 3b 4c 25 2b  31 22 20 29 22 3b 3a e8  |( <";L%+1" )";:.|
00000c70  2c 49 25 3a e7 49 25 3c  31 20 84 20 49 25 3e 4c  |,I%:.I%<1 . I%>L|
00000c80  25 20 f1 22 20 49 6c 6c  65 67 61 6c 20 76 61 6c  |% ." Illegal val|
00000c90  75 65 22 3a e5 8d 64 52  45 20 8b 20 58 25 3d 49  |ue":..dRE . X%=I|
00000ca0  25 2d 31 0d 05 dc 5c f1  22 4e 65 77 20 6e 75 6d  |%-1...\."New num|
00000cb0  62 65 72 20 6f 66 20 72  6f 77 73 20 28 20 3c 22  |ber of rows ( <"|
00000cc0  3b 4c 25 2b 31 22 20 29  22 3b 3a e8 2c 49 25 3a  |;L%+1" )";:.,I%:|
00000cd0  e7 49 25 3c 31 20 84 20  49 25 3e 4c 25 20 f1 22  |.I%<1 . I%>L% ."|
00000ce0  20 49 6c 6c 65 67 61 6c  20 76 61 6c 75 65 22 3a  | Illegal value":|
00000cf0  e5 8d 64 52 45 20 8b 20  59 25 3d 49 25 2d 31 0d  |..dRE . Y%=I%-1.|
00000d00  05 e6 15 44 58 3d 57 2f  58 25 3a 44 59 3d 48 2f  |...DX=W/X%:DY=H/|
00000d10  59 25 3a e1 0d 05 f0 05  3a 0d 05 fa 09 dd f2 61  |Y%:.....:......a|
00000d20  73 6b 0d 06 04 0d 2a 46  58 32 30 32 2c 34 30 0d  |sk....*FX202,40.|
00000d30  06 0e 1f f1 3b 22 20 49  73 20 74 68 69 73 20 4f  |....;" Is this O|
00000d40  4b 20 28 59 2f 4e 29 22  3b 3a f2 51 3a e1 0d 06  |K (Y/N)";:.Q:...|
00000d50  18 0e dd f2 51 3a f1 3b  22 3f 22 3b 0d 06 22 28  |....Q:.;"?";.."(|
00000d60  41 24 3d bd 28 a5 20 80  20 32 32 33 29 3a e7 41  |A$=.(. . 223):.A|
00000d70  24 3c 3e 22 59 22 80 20  41 24 3c 3e 22 4e 22 e5  |$<>"Y". A$<>"N".|
00000d80  8d 54 62 46 0d 06 2c 0a  f1 3b 41 24 3a e1 0d 06  |.TbF..,..;A$:...|
00000d90  36 05 3a 0d 06 40 0a dd  f2 6d 6f 64 65 0d 06 4a  |6.:..@...mode..J|
00000da0  0f 54 25 3d 2d 31 3a 40  25 3d 31 30 0d 06 54 27  |.T%=-1:@%=10..T'|
00000db0  db 3a f1 8a 37 2c 31 29  bd 31 33 34 22 54 68 65  |.:..7,1).134"The|
00000dc0  20 4d 61 6e 64 65 6c 62  72 6f 74 20 53 65 74 22  | Mandelbrot Set"|
00000dd0  27 27 27 0d 06 5e aa f1  22 54 68 65 72 65 20 61  |'''..^.."There a|
00000de0  72 65 20 74 77 6f 20 61  76 61 69 6c 61 62 6c 65  |re two available|
00000df0  20 70 6c 6f 74 20 6d 6f  64 65 73 3a 22 27 27 22  | plot modes:"''"|
00000e00  31 29 22 2b bd 31 33 31  2b 22 48 69 67 68 20 72  |1)"+.131+"High r|
00000e10  65 73 6f 6c 75 74 69 6f  6e 20 28 32 35 36 20 6c  |esolution (256 l|
00000e20  69 6e 65 73 29 20 61 6e  64 22 27 22 66 6f 75 72  |ines) and"'"four|
00000e30  20 63 6f 6c 6f 75 72 73  2c 22 27 27 22 32 29 20  | colours,"''"2) |
00000e40  4c 6f 77 20 72 65 73 6f  6c 75 74 69 6f 6e 20 28  |Low resolution (|
00000e50  31 32 38 20 6c 69 6e 65  73 29 20 61 6e 64 22 27  |128 lines) and"'|
00000e60  bd 31 33 31 2b 22 65 69  67 68 74 22 2b bd 31 33  |.131+"eight"+.13|
00000e70  35 2b 22 63 6f 6c 6f 75  72 73 2e 22 27 0d 06 68  |5+"colours."'..h|
00000e80  44 e7 4d 25 3d 30 20 f1  27 22 57 68 69 63 68 20  |D.M%=0 .'"Which |
00000e90  6d 6f 64 65 20 77 6f 75  6c 64 20 79 6f 75 20 6c  |mode would you l|
00000ea0  69 6b 65 20 28 31 20 6f  72 20 32 29 3f 20 22 3b  |ike (1 or 2)? ";|
00000eb0  3a 4d 25 3d a5 2d 34 38  20 8b 20 e5 20 8d 44 7c  |:M%=.-48 . . .D||
00000ec0  46 0d 06 72 23 e7 4d 25  3c 31 84 4d 25 3e 32 4d  |F..r#.M%<1.M%>2M|
00000ed0  25 3d 30 3a e5 8d 44 68  46 8b f1 3b 4d 25 3a e5  |%=0:..DhF..;M%:.|
00000ee0  8d 74 46 46 0d 06 7c 40  f1 22 50 6c 6f 74 20 6d  |.tFF..|@."Plot m|
00000ef0  6f 64 65 20 77 69 6c 6c  20 62 65 22 2b bd 31 33  |ode will be"+.13|
00000f00  34 3b 4d 25 3b bd 31 33  35 3b 3a f2 61 73 6b 3a  |4;M%;.135;:.ask:|
00000f10  e7 41 24 3d 22 4e 22 4d  25 3d 33 2d 4d 25 3a e5  |.A$="N"M%=3-M%:.|
00000f20  8d 44 7c 46 0d 06 86 11  ee 4d 25 e5 8d 74 50 46  |.D|F.....M%..tPF|
00000f30  2c 8d 74 5a 46 0d 06 90  6d 47 25 3d 33 32 3a 48  |,.tZF...mG%=32:H|
00000f40  25 3d 33 39 3a 43 25 3d  33 3a e3 49 25 3d 30 b8  |%=39:C%=3:.I%=0.|
00000f50  31 35 3a 3f 28 49 25 2b  26 43 31 30 29 3d 34 2a  |15:?(I%+&C10)=4*|
00000f60  49 25 3a 3f 28 49 25 2b  26 43 30 30 29 3d 28 49  |I%:?(I%+&C00)=(I|
00000f70  25 2b 31 29 83 34 3a ed  3a 4b 4f 4c 25 28 30 29  |%+1).4:.:KOL%(0)|
00000f80  3d 30 3a 4b 4f 4c 25 28  31 29 3d 34 3a 4b 4f 4c  |=0:KOL%(1)=4:KOL|
00000f90  25 28 32 29 3d 36 3a 4b  4f 4c 25 28 33 29 3d 37  |%(2)=6:KOL%(3)=7|
00000fa0  3a e1 0d 06 9a 72 47 25  3d 31 36 3a 48 25 3d 31  |:....rG%=16:H%=1|
00000fb0  39 3a 43 25 3d 37 3a e3  49 25 3d 30 b8 31 35 3a  |9:C%=7:.I%=0.15:|
00000fc0  3f 28 49 25 2b 26 43 31  30 29 3d 32 2a 49 25 3a  |?(I%+&C10)=2*I%:|
00000fd0  ed 3a 21 26 43 30 30 3d  26 30 32 30 35 30 31 30  |.:!&C00=&0205010|
00000fe0  34 3a 21 26 30 43 30 34  3d 26 30 30 30 37 30 33  |4:!&0C04=&000703|
00000ff0  30 36 3a 21 26 43 30 38  3d 26 30 32 30 35 30 31  |06:!&C08=&020501|
00001000  30 34 3a 21 26 43 30 43  3d 26 30 38 30 37 30 33  |04:!&C0C=&080703|
00001010  30 36 3a e1 0d 06 a4 05  3a 0d 06 ae 0a dd f2 72  |06:.....:......r|
00001020  75 6c 65 0d 06 b8 65 db  3a 40 25 3d 31 30 3a f1  |ule...e.:@%=10:.|
00001030  27 27 22 54 68 65 20 4d  61 6e 64 6c 65 62 72 6f  |''"The Mandlebro|
00001040  74 20 66 6f 72 6d 75 6c  61 20 75 73 65 64 20 77  |t formula used w|
00001050  69 6c 6c 20 62 65 3a 22  27 27 22 20 20 20 20 5a  |ill be:"''"    Z|
00001060  5e 22 3b 54 25 2b 33 3b  22 20 2b 20 43 20 3d 3e  |^";T%+3;" + C =>|
00001070  20 5a 27 22 27 27 3a f2  61 73 6b 3a e7 41 24 3d  | Z'"'':.ask:.A$=|
00001080  22 59 22 e5 8d 64 56 46  0d 06 c2 50 f1 27 22 45  |"Y"..dVF...P.'"E|
00001090  6e 74 65 72 20 6e 65 77  20 65 78 70 6f 6e 65 6e  |nter new exponen|
000010a0  74 20 28 32 2d 34 29 20  22 3b 3a 49 25 3d a5 2d  |t (2-4) ";:I%=.-|
000010b0  34 38 3a f1 3b 49 25 3a  e7 49 25 3c 32 84 49 25  |48:.;I%:.I%<2.I%|
000010c0  3e 34 f1 22 49 6c 6c 65  67 61 6c 20 76 61 6c 75  |>4."Illegal valu|
000010d0  65 22 3a e5 8d 64 42 46  0d 06 cc 11 54 25 3d 49  |e":..dBF....T%=I|
000010e0  25 2d 33 3a e5 8d 74 78  46 0d 06 d6 18 ee 54 25  |%-3:..txF.....T%|
000010f0  2b 32 e5 8d 64 60 46 2c  8d 64 6a 46 2c 8d 64 74  |+2..d`F,.djF,.dt|
00001100  46 0d 06 e0 22 58 4d 49  4e 3d 2d 32 3a 59 4d 49  |F..."XMIN=-2:YMI|
00001110  4e 3d 2d 31 2e 32 35 3a  57 3d 32 2e 35 3a 48 3d  |N=-1.25:W=2.5:H=|
00001120  57 3a e1 0d 06 ea 21 58  4d 49 4e 3d 2d 31 2e 35  |W:....!XMIN=-1.5|
00001130  3a 59 4d 49 4e 3d 2d 31  2e 35 3a 57 3d 33 3a 48  |:YMIN=-1.5:W=3:H|
00001140  3d 33 3a e1 0d 06 f4 24  58 4d 49 4e 3d 2d 31 2e  |=3:....$XMIN=-1.|
00001150  35 3a 59 4d 49 4e 3d 2d  31 2e 32 35 3a 57 3d 32  |5:YMIN=-1.25:W=2|
00001160  2e 35 3a 48 3d 57 3a e1  0d 06 fe 05 3a 0d 07 08  |.5:H=W:.....:...|
00001170  09 dd f2 62 6f 78 0d 07  12 1d db 3a f1 22 42 4f  |...box.....:."BO|
00001180  58 20 59 2f 4e 22 3b 3a  f2 51 3a e7 41 24 3d 22  |X Y/N";:.Q:.A$="|
00001190  4e 22 e1 0d 07 1c 38 db  3a 53 25 3d 34 2a 4d 25  |N"....8.:S%=4*M%|
000011a0  3a 55 25 3d 30 3a 56 25  3d 30 3a 41 25 3d 36 34  |:U%=0:V%=0:A%=64|
000011b0  30 3a 42 25 3d 35 31 32  3a e6 33 2c 33 3a ec 55  |0:B%=512:.3,3:.U|
000011c0  25 2c 56 25 3a df 41 25  2c 42 25 0d 07 26 0a 2a  |%,V%:.A%,B%..&.*|
000011d0  46 58 34 2c 31 0d 07 30  0b 2a 46 58 31 32 2c 34  |FX4,1..0.*FX12,4|
000011e0  0d 07 3a 16 41 24 3d be  3a f5 3a f2 62 78 3a fd  |..:.A$=.:.:.bx:.|
000011f0  41 24 3d 22 51 22 0d 07  44 0a 2a 46 58 34 2c 30  |A$="Q"..D.*FX4,0|
00001200  0d 07 4e 0b 2a 46 58 31  32 2c 30 0d 07 58 3a db  |..N.*FX12,0..X:.|
00001210  3a f2 61 73 6b 3a ec 55  25 2c 56 25 3a df 55 25  |:.ask:.U%,V%:.U%|
00001220  2c 42 25 3a df 41 25 2c  42 25 3a df 41 25 2c 56  |,B%:.A%,B%:.A%,V|
00001230  25 3a df 55 25 2c 56 25  3a e7 41 24 3d 22 4e 22  |%:.U%,V%:.A$="N"|
00001240  e5 8d 54 5c 47 0d 07 62  22 db 3a f1 22 44 72 61  |..T\G..b".:."Dra|
00001250  77 20 6e 65 77 20 6f 6e  65 22 3b 3a f2 51 3a e7  |w new one";:.Q:.|
00001260  41 24 3d 22 4e 22 e1 0d  07 6c 4b 58 4d 49 4e 3d  |A$="N"...lKXMIN=|
00001270  58 4d 49 4e 2b 44 58 2a  55 25 2f 53 25 3a 59 4d  |XMIN+DX*U%/S%:YM|
00001280  49 4e 3d 59 4d 49 4e 2b  44 59 2a 56 25 2f 53 25  |IN=YMIN+DY*V%/S%|
00001290  3a 57 3d 28 41 25 2d 55  25 29 2a 44 58 2f 53 25  |:W=(A%-U%)*DX/S%|
000012a0  3a 48 3d 28 42 25 2d 56  25 29 2a 44 59 2f 53 25  |:H=(B%-V%)*DY/S%|
000012b0  3a e1 0d 07 76 05 e1 0d  07 80 05 3a 0d 07 8a 08  |:...v......:....|
000012c0  dd f2 62 78 0d 07 94 16  e7 a7 22 4c 52 22 2c 41  |..bx......"LR",A|
000012d0  24 29 3d 30 41 24 3d be  3a e1 0d 07 9e 57 ec 55  |$)=0A$=.:....W.U|
000012e0  25 2c 56 25 3a df 41 25  2c 42 25 3a e7 41 24 3d  |%,V%:.A%,B%:.A$=|
000012f0  22 4c 22 55 25 3d 41 25  3a 56 25 3d 42 25 8b e7  |"L"U%=A%:V%=B%..|
00001300  41 24 3d 22 52 22 ec 55  25 2c 56 25 3a df 55 25  |A$="R".U%,V%:.U%|
00001310  2c 42 25 3a df 41 25 2c  42 25 3a df 41 25 2c 56  |,B%:.A%,B%:.A%,V|
00001320  25 3a df 55 25 2c 56 25  3a 41 24 3d 22 51 22 3a  |%:.U%,V%:A$="Q":|
00001330  e1 0d 07 a8 47 e7 41 24  3d bd 31 33 36 41 25 3d  |....G.A$=.136A%=|
00001340  41 25 2d 53 25 8b e7 41  24 3d bd 31 33 37 41 25  |A%-S%..A$=.137A%|
00001350  3d 41 25 2b 53 25 8b e7  41 24 3d bd 31 33 39 42  |=A%+S%..A$=.139B|
00001360  25 3d 42 25 2b 53 25 8b  e7 41 24 3d bd 31 33 38  |%=B%+S%..A$=.138|
00001370  42 25 3d 42 25 2d 53 25  0d 07 b2 19 20 ec 55 25  |B%=B%-S%.... .U%|
00001380  2c 56 25 3a df 41 25 2c  42 25 3a 41 24 3d be 3a  |,V%:.A%,B%:A$=.:|
00001390  e1 0d 07 bc 05 3a 0d 07  c6 30 dd f2 6d 61 6e 64  |.....:...0..mand|
000013a0  65 6c 28 58 4d 49 4e 2c  59 4d 49 4e 2c 44 58 2c  |el(XMIN,YMIN,DX,|
000013b0  44 59 29 3a 50 25 3d 43  25 3f 26 43 31 30 3a 4c  |DY):P%=C%?&C10:L|
000013c0  25 3d 4d 25 2a 34 0d 07  d0 48 59 3d 59 4d 49 4e  |%=M%*4...HY=YMIN|
000013d0  2d 44 59 3a e3 56 25 3d  30 b8 59 25 3a f1 56 25  |-DY:.V%=0.Y%:.V%|
000013e0  3a 59 3d 59 2b 44 59 3a  58 3d 58 4d 49 4e 2d 44  |:Y=Y+DY:X=XMIN-D|
000013f0  58 3a e3 55 25 3d 30 b8  58 25 3a 58 3d 58 2b 44  |X:.U%=0.X%:X=X+D|
00001400  58 3a 55 3d 58 3a 56 3d  58 3a 4e 25 3d 30 0d 07  |X:U=X:V=X:N%=0..|
00001410  da 18 ee 54 25 2b 32 e5  8d 64 64 47 2c 8d 64 6e  |...T%+2..ddG,.dn|
00001420  47 2c 8d 64 78 47 0d 07  e4 47 41 3d 55 2a 55 3a  |G,.dxG...GA=U*U:|
00001430  42 3d 56 2a 56 3a e7 41  2b 42 3e 34 e5 8d 54 42  |B=V*V:.A+B>4..TB|
00001440  48 8b 4e 25 3d 4e 25 2b  31 3a e7 4e 25 3d 50 25  |H.N%=N%+1:.N%=P%|
00001450  e5 8d 54 42 48 8b 56 3d  59 2b 32 2a 55 2a 56 3a  |..TBH.V=Y+2*U*V:|
00001460  55 3d 58 2b 41 2d 42 3a  e5 8d 64 64 47 0d 07 ee  |U=X+A-B:..ddG...|
00001470  51 41 3d 55 2a 55 3a 42  3d 56 2a 56 3a e7 41 2b  |QA=U*U:B=V*V:.A+|
00001480  42 3e 32 e5 8d 54 42 48  8b 4e 25 3d 4e 25 2b 31  |B>2..TBH.N%=N%+1|
00001490  3a e7 4e 25 3d 50 25 e5  8d 54 42 48 8b 56 3d 59  |:.N%=P%..TBH.V=Y|
000014a0  2b 56 2a 28 33 2a 41 2d  42 29 3a 55 3d 58 2b 55  |+V*(3*A-B):U=X+U|
000014b0  2a 28 41 2d 33 2a 42 29  3a e5 8d 64 6e 47 0d 07  |*(A-3*B):..dnG..|
000014c0  f8 57 41 3d 55 2a 55 3a  42 3d 56 2a 56 3a e7 41  |.WA=U*U:B=V*V:.A|
000014d0  2b 42 3e 32 e5 8d 54 42  48 8b 4e 25 3d 4e 25 2b  |+B>2..TBH.N%=N%+|
000014e0  31 3a e7 4e 25 3d 50 25  e5 8d 54 42 48 8b 56 3d  |1:.N%=P%..TBH.V=|
000014f0  59 2b 34 2a 55 2a 56 2a  28 41 2d 42 29 3a 55 3d  |Y+4*U*V*(A-B):U=|
00001500  58 2b 41 2a 41 2b 42 2a  42 2d 36 2a 41 2a 42 3a  |X+A*A+B*B-6*A*B:|
00001510  e5 8d 64 78 47 0d 08 02  31 4a 25 3d 43 25 3f 26  |..dxG...1J%=C%?&|
00001520  43 30 30 3a e3 49 25 3d  43 25 b8 31 88 2d 31 3a  |C00:.I%=C%.1.-1:|
00001530  e7 4e 25 3c 49 25 3f 26  43 31 30 20 4a 25 3d 49  |.N%<I%?&C10 J%=I|
00001540  25 3f 26 42 46 46 0d 08  0c 32 ed 3a e6 30 2c 4a  |%?&BFF...2.:.0,J|
00001550  25 3a f0 36 39 2c 55 25  2a 4c 25 2c 56 25 2a 4c  |%:.69,U%*L%,V%*L|
00001560  25 3a e7 4d 25 3d 32 f0  36 39 2c 55 25 2a 4c 25  |%:.M%=2.69,U%*L%|
00001570  2c 56 25 2a 4c 25 2b 34  0d 08 16 09 20 ed 2c 3a  |,V%*L%+4.... .,:|
00001580  e1 0d ff                                          |...|
00001583
Graphics/MANDEL2.m0
Graphics/MANDEL2.m1
Graphics/MANDEL2.m2
Graphics/MANDEL2.m4
Graphics/MANDEL2.m5