Home » Archimedes archive » Acorn User » AU 1994-11.adf » !StarInfo_StarInfo » Ainsworth/ThomasinaA
Ainsworth/ThomasinaA
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 1994-11.adf » !StarInfo_StarInfo |
Filename: | Ainsworth/ThomasinaA |
Read OK: | ✔ |
File size: | 1057 bytes |
Load address: | 0000 |
Exec address: | 0000 |
File contents
10REM Thomasina 20REM LEN 1994 Mark Ainsworth 30REM Based on an algorithm by Peter Barnes/Mark Ainsworth 40REM which was in turn inspired by the play 50REM PAGEArcadiaTIME by Tom Stoppard, where a girl called Thomasina discovers 60REM ABSA wonderful new method whereby all the forms of nature must 70REM give up their secrets and draw themselves in number alone.ACS 80: 90ON ERROR REPORT:PRINT " at line ";ERL:END 100PROCinit 110REPEAT 120 CLS 130 COLOUR black% 140 PRINTTAB(0,0)"a= ";a 150 PRINTTAB(0,1)"b= ";b 160 IF info% THEN PROCorigin(48) 170 PROCplot 180 PROCorigin (48/factor) 190 PROCzoom 200UNTIL FALSE 210: 220DEF PROCinit 230MODE 9 240width%=1280 250xstep%=4 260height%=1024 270ystep%=4 280maxcols%=15 290screen%=1 300left=-4 310right=6 320top=9 330bottom=-2.5 340size=(right-left)*(top-bottom) 350null=RND(-TIME) 360atop=1.3 : abot=0 : arange=atop-abot 370btop=2 : bbot=0 : brange=btop-bbot 380PRINT"THOMASINA � The Barnes-Ainsworth Curve" 390PRINT"Program � 1994 Mark Ainsworth" 400PRINT'"Use + and - to alter grey shades." 410PRINT"Press Select to zoom, and then drag a zoom box." 420PRINT''"Press RETURN for random values..." 430INPUT TAB(1,8)"a = "a$ 440IF a$="" THEN 450 a=arange*RND(1)+abot 460ELSE 470 a=VAL(a$) 480ENDIF 490PRINT TAB(5,8)a 500INPUT TAB(1,9)"b = "b$ 510IF b$="" THEN 520 b=brange*RND(1)+bbot 530ELSE 540 b=VAL(b$) 550ENDIF 560PRINT TAB(5,9)b 570INPUT'"Setting? (Fast/Info/Normal : 1st letter) "info$ 580fast%=FALSE 590info%=FALSE 600CASE info$ OF 610 WHEN "F","f" : fast%=TRUE 620 WHEN "I","i" : info%=TRUE 630ENDCASE 640INPUT'"Repetitions";reps% 650PROCfactor 660PROCrecolour 670PROCresize 680ENDPROC 690: 700DEF PROCrecolour 710IF colours%>maxcols% THEN colours%=maxcols% 720IF colours%=0 THEN colours%=1 730FOR col%=0 TO colours% 740 grade%=255-col%*(255/colours%) 750 COLOUR col%,grade%,grade%,grade% 760NEXT col% 770col%=colours%+1 780WHILE col%<=maxcols% 790 COLOUR col%,0,0,0 800 col%+=1 810ENDWHILE 820black%=maxcols% 830ENDPROC 840: 850DEF PROCresize 860xfactor=width%/(right-left) 870yfactor=height%/(top-bottom) 880midx%=-left*width%/(right-left) 890midy%=-bottom*height%/(top-bottom) 900VDU29,midx%;midy%; 910ENDPROC 920: 930DEF PROCplot 940xn=0 950yn=0 960FOR x%=-midx% TO width%-midx% STEP xstep% 970 new%=TRUE 980 FOR y%=-midy% TO height%-midy% STEP ystep% 990 x=x%/xfactor 1000 y=y%/yfactor 1010 FOR count%=1 TO reps% 1020 x=SQR(ABS(x*x-2*x+a))-y 1030 y=SQR(ABS(y*y-2*y-b))+x 1040 NEXT count% 1050 IF NOT fast% THEN PROCslow ELSE col%=black% 1060 GCOL 0,col% 1070 POINT xfactor*x, yfactor*y 1080 NEXT y% 1090NEXT x% 1100ENDPROC 1110: 1120DEF PROCslow 1130IF info% THEN PROCinfo 1140G$=INKEY$(0) 1150IF G$<>"" THEN 1160 IF G$="-" AND colours%<maxcols% THEN colours%=colours%*2:PROCrecolour 1170 IF G$="+" AND colours%>2 THEN colours%=colours%/2:PROCrecolour 1180ENDIF 1190col%=POINT(xfactor*x, yfactor*y) 1200IF col%<maxcols% THEN col%+=1 1210ENDPROC 1220: 1230DEF PROCinfo 1240IF NOT new% THEN 1250 xp=xn 1260 yp=yn 1270 GCOL 3,colours% 1280 xn=x*xfactor 1290 yn=y*yfactor 1300 MOVE xp,yp:DRAW xn,yn 1310 PROCpoint(x%/xfactor,y%/yfactor,0) 1320 PROCplace(x%,y%) 1330 WAIT 1340 MOVE xp,yp:DRAW xn,yn 1350 PROCplace(x%,y%) 1360ELSE 1370 xp=x*xfactor 1380 yp=y*yfactor 1390 new%=FALSE 1400ENDIF 1410ENDPROC 1420: 1430DEF PROCzoom 1440MOUSE ON 1450REPEAT:MOUSE X%,Y%,T%:UNTIL T%<>4 1460GCOL 3,colours% 1470REPEAT 1480 MOUSE X%,Y%,T% 1490 G$=INKEY$(0) 1500 IF G$<>"" THEN 1510 IF G$="-" AND colours%<maxcols% THEN colours%=colours%*2:PROCrecolour 1520 IF G$="+" AND colours%>2 THEN colours%=colours%/2:PROCrecolour 1530 IF G$="s" OR G$="S" THEN OSCLI("Screensave Thomasina"+STR$(screen%)):screen%+=1 1540 ENDIF 1550 PROCcoord 1560UNTIL T%=4 1570X1%=X% 1580Y1%=Y% 1590X2%=X1% 1600Y2%=Y1% 1610PROCrectangle 1620REPEAT 1630 PROCrectangle 1640 MOUSE X%,Y%,T% 1650 X2%=X% 1660 Y2%=Y% 1670 PROCcoord 1680 PROCsides 1690 PROCrectangle 1700 WAIT 1710UNTIL T%<4 1720PROCresize 1730PROCfactor 1740PROCrecolour 1750MOUSE OFF 1760ENDPROC 1770: 1780DEF PROCcoord 1790COLOUR black% 1800PRINT TAB(0,2)"x= ";X%/xfactor 1810PRINT TAB(0,3)"y= ";Y%/yfactor 1820ENDPROC 1830: 1840DEF PROCrectangle 1850RECTANGLE X1%,Y1%,(X2%-X1%),(Y2%-Y1%) 1860ENDPROC 1870: 1880DEF PROCfactor 1890IF left<>right AND top<>bottom THEN 1900 factor=(((right-left)*(top-bottom))/size)^0.5 1910ELSE 1920 factor=0 1930ENDIF 1940colours%=maxcols%*factor 1950IF fast% THEN colours%=1 1960ENDPROC 1970: 1980DEF PROCsides 1990left=X1%/xfactor 2000right=X2%/xfactor 2010top=Y1%/yfactor 2020bottom=Y2%/yfactor 2030IF left>right THEN temp=left:left=right:right=temp 2040IF bottom>top THEN temp=bottom:bottom=top:top=temp 2050ENDPROC 2060: 2070DEF PROCorigin(s) 2080GCOL 0,black% 2090ss=s/8 2100MOVE 0,s:DRAW 0,0:DRAW s,0 2110MOVE -ss,s-ss:DRAW 0,s:DRAW ss,s-ss 2120MOVE s-ss,-ss:DRAW s,0:DRAW s-ss,ss 2130ENDPROC 2140: 2150DEF PROCpoint(x,y,p) 2160PRINT TAB(0,3+p)"(";STR$(x);",";STR$(y);") " 2170ENDPROC 2180: 2190DEF PROCplace(x%,y%) 2200CIRCLE x%,y%,16 2210POINT x%,y% 2220ENDPROC
� Thomasina � � 1994 Mark Ainsworth :� Based on an algorithm by Peter Barnes/Mark Ainsworth (,� which was in turn inspired by the play 2H� �Arcadia� by Tom Stoppard, where a girl called Thomasina discovers <B� �A wonderful new method whereby all the forms of nature must FA� give up their secrets and draw themselves in number alone.� P: Z� � �:� " at line ";�:� d �init n� x � � � black% � �0,0)"a= ";a � �0,1)"b= ";b � � info% � �origin(48) � �plot � �origin (48/factor) � �zoom �� � �: �� �init �� 9 �width%=1280 �xstep%=4 height%=1024 ystep%=4 maxcols%=15 " screen%=1 ,left=-4 6right=6 @ top=9 Jbottom=-2.5 T"size=(right-left)*(top-bottom) ^null=�(-�) h(atop=1.3 : abot=0 : arange=atop-abot r&btop=2 : bbot=0 : brange=btop-bbot |-�"THOMASINA � The Barnes-Ainsworth Curve" �$�"Program � 1994 Mark Ainsworth" �)�'"Use + and - to alter grey shades." �6�"Press Select to zoom, and then drag a zoom box." �*�''"Press RETURN for random values..." �� �1,8)"a = "a$ � � a$="" � � a=arange*�(1)+abot �� � a=�(a$) �� �� �5,8)a �� �1,9)"b = "b$ � � b$="" � b=brange*�(1)+bbot � b=�(b$) &� 0� �5,9)b :6�'"Setting? (Fast/Info/Normal : 1st letter) "info$ Dfast%=� Ninfo%=� XȎ info$ � b � "F","f" : fast%=� l � "I","i" : info%=� v� ��'"Repetitions";reps% ��factor � �recolour ��resize �� �: �� �recolour �+� colours%>maxcols% � colours%=maxcols% �� colours%=0 � colours%=1 �� col%=0 � colours% �$ grade%=255-col%*(255/colours%) �! � col%,grade%,grade%,grade% � � col% col%=colours%+1 ȕ col%<=maxcols% � col%,0,0,0 col%+=1 *� 4black%=maxcols% >� H: R � �resize \xfactor=width%/(right-left) f yfactor=height%/(top-bottom) p#midx%=-left*width%/(right-left) z&midy%=-bottom*height%/(top-bottom) ��29,midx%;midy%; �� �: �� �plot �xn=0 �yn=0 �'� x%=-midx% � width%-midx% � xstep% � new%=� �* � y%=-midy% � height%-midy% � ystep% � x=x%/xfactor � y=y%/yfactor � � count%=1 � reps% � x=�(�(x*x-2*x+a))-y y=�(�(y*y-2*y-b))+x � count% ' � � fast% � �slow � col%=black% $ � 0,col% . Ȓ xfactor*x, yfactor*y 8 � y% B� x% L� V: `� �slow j� info% � �info tG$=�(0) ~� G$<>"" � �B � G$="-" � colours%<maxcols% � colours%=colours%*2:�recolour �; � G$="+" � colours%>2 � colours%=colours%/2:�recolour �� �col%=�xfactor*x, yfactor*y) �� col%<maxcols% � col%+=1 �� �: �� �info �� � new% � � xp=xn � yp=yn � � 3,colours% xn=x*xfactor yn=y*yfactor � xp,yp:� xn,yn % �point(x%/xfactor,y%/yfactor,0) ( �place(x%,y%) 2 Ȗ < � xp,yp:� xn,yn F �place(x%,y%) P� Z xp=x*xfactor d yp=y*yfactor n new%=� x� �� �: �� �zoom �ȗ � ��:ȗ X%,Y%,T%:� T%<>4 �� 3,colours% �� � ȗ X%,Y%,T% � G$=�(0) � � G$<>"" � �D � G$="-" � colours%<maxcols% � colours%=colours%*2:�recolour �= � G$="+" � colours%>2 � colours%=colours%/2:�recolour �K � G$="s" � G$="S" � �("Screensave Thomasina"+�(screen%)):screen%+=1 � �coord � T%=4 " X1%=X% , Y1%=Y% 6X2%=X1% @Y2%=Y1% J�rectangle T� ^ �rectangle h ȗ X%,Y%,T% r X2%=X% | Y2%=Y% � �coord � �sides � �rectangle � Ȗ � � T%<4 ��resize ��factor � �recolour �ȗ � �� �: �� �coord �� black% � �0,2)"x= ";X%/xfactor � �0,3)"y= ";Y%/yfactor � &: 0� �rectangle :"ȓ X1%,Y1%,(X2%-X1%),(Y2%-Y1%) D� N: X � �factor b!� left<>right � top<>bottom � l3 factor=(((right-left)*(top-bottom))/size)^0.5 v� � factor=0 �� �colours%=maxcols%*factor �� fast% � colours%=1 �� �: �� �sides �left=X1%/xfactor �right=X2%/xfactor �top=Y1%/yfactor �bottom=Y2%/yfactor �2� left>right � temp=left:left=right:right=temp �2� bottom>top � temp=bottom:bottom=top:top=temp � : � �origin(s) � 0,black% * ss=s/8 4� 0,s:� 0,0:� s,0 >� -ss,s-ss:� 0,s:� ss,s-ss H� s-ss,-ss:� s,0:� s-ss,ss R� \: f� �point(x,y,p) p(� �0,3+p)"(";�(x);",";�(y);") " z� �: �� �place(x%,y%) �ȏ x%,y%,16 �Ȓ x%,y% �� �
00000000 0d 00 0a 0f f4 20 54 68 6f 6d 61 73 69 6e 61 0d |..... Thomasina.| 00000010 00 14 1b f4 20 a9 20 31 39 39 34 20 4d 61 72 6b |.... . 1994 Mark| 00000020 20 41 69 6e 73 77 6f 72 74 68 0d 00 1e 3a f4 20 | Ainsworth...:. | 00000030 42 61 73 65 64 20 6f 6e 20 61 6e 20 61 6c 67 6f |Based on an algo| 00000040 72 69 74 68 6d 20 62 79 20 50 65 74 65 72 20 42 |rithm by Peter B| 00000050 61 72 6e 65 73 2f 4d 61 72 6b 20 41 69 6e 73 77 |arnes/Mark Ainsw| 00000060 6f 72 74 68 0d 00 28 2c f4 20 77 68 69 63 68 20 |orth..(,. which | 00000070 77 61 73 20 69 6e 20 74 75 72 6e 20 69 6e 73 70 |was in turn insp| 00000080 69 72 65 64 20 62 79 20 74 68 65 20 70 6c 61 79 |ired by the play| 00000090 0d 00 32 48 f4 20 90 41 72 63 61 64 69 61 91 20 |..2H. .Arcadia. | 000000a0 62 79 20 54 6f 6d 20 53 74 6f 70 70 61 72 64 2c |by Tom Stoppard,| 000000b0 20 77 68 65 72 65 20 61 20 67 69 72 6c 20 63 61 | where a girl ca| 000000c0 6c 6c 65 64 20 54 68 6f 6d 61 73 69 6e 61 20 64 |lled Thomasina d| 000000d0 69 73 63 6f 76 65 72 73 0d 00 3c 42 f4 20 94 41 |iscovers..<B. .A| 000000e0 20 77 6f 6e 64 65 72 66 75 6c 20 6e 65 77 20 6d | wonderful new m| 000000f0 65 74 68 6f 64 20 77 68 65 72 65 62 79 20 61 6c |ethod whereby al| 00000100 6c 20 74 68 65 20 66 6f 72 6d 73 20 6f 66 20 6e |l the forms of n| 00000110 61 74 75 72 65 20 6d 75 73 74 0d 00 46 41 f4 20 |ature must..FA. | 00000120 67 69 76 65 20 75 70 20 74 68 65 69 72 20 73 65 |give up their se| 00000130 63 72 65 74 73 20 61 6e 64 20 64 72 61 77 20 74 |crets and draw t| 00000140 68 65 6d 73 65 6c 76 65 73 20 69 6e 20 6e 75 6d |hemselves in num| 00000150 62 65 72 20 61 6c 6f 6e 65 2e 95 0d 00 50 05 3a |ber alone....P.:| 00000160 0d 00 5a 1b ee 20 85 20 f6 3a f1 20 22 20 61 74 |..Z.. . .:. " at| 00000170 20 6c 69 6e 65 20 22 3b 9e 3a e0 0d 00 64 09 f2 | line ";.:...d..| 00000180 69 6e 69 74 0d 00 6e 05 f5 0d 00 78 07 20 20 db |init..n....x. .| 00000190 0d 00 82 0e 20 20 fb 20 62 6c 61 63 6b 25 0d 00 |.... . black%..| 000001a0 8c 13 20 20 f1 8a 30 2c 30 29 22 61 3d 20 22 3b |.. ..0,0)"a= ";| 000001b0 61 0d 00 96 13 20 20 f1 8a 30 2c 31 29 22 62 3d |a.... ..0,1)"b=| 000001c0 20 22 3b 62 0d 00 a0 1b 20 20 e7 20 69 6e 66 6f | ";b.... . info| 000001d0 25 20 8c 20 f2 6f 72 69 67 69 6e 28 34 38 29 0d |% . .origin(48).| 000001e0 00 aa 0b 20 20 f2 70 6c 6f 74 0d 00 b4 19 20 20 |... .plot.... | 000001f0 f2 6f 72 69 67 69 6e 20 28 34 38 2f 66 61 63 74 |.origin (48/fact| 00000200 6f 72 29 0d 00 be 0b 20 20 f2 7a 6f 6f 6d 0d 00 |or).... .zoom..| 00000210 c8 07 fd 20 a3 0d 00 d2 05 3a 0d 00 dc 0b dd 20 |... .....:..... | 00000220 f2 69 6e 69 74 0d 00 e6 07 eb 20 39 0d 00 f0 0f |.init..... 9....| 00000230 77 69 64 74 68 25 3d 31 32 38 30 0d 00 fa 0c 78 |width%=1280....x| 00000240 73 74 65 70 25 3d 34 0d 01 04 10 68 65 69 67 68 |step%=4....heigh| 00000250 74 25 3d 31 30 32 34 0d 01 0e 0c 79 73 74 65 70 |t%=1024....ystep| 00000260 25 3d 34 0d 01 18 0f 6d 61 78 63 6f 6c 73 25 3d |%=4....maxcols%=| 00000270 31 35 0d 01 22 0d 73 63 72 65 65 6e 25 3d 31 0d |15..".screen%=1.| 00000280 01 2c 0b 6c 65 66 74 3d 2d 34 0d 01 36 0b 72 69 |.,.left=-4..6.ri| 00000290 67 68 74 3d 36 0d 01 40 09 74 6f 70 3d 39 0d 01 |ght=6..@.top=9..| 000002a0 4a 0f 62 6f 74 74 6f 6d 3d 2d 32 2e 35 0d 01 54 |J.bottom=-2.5..T| 000002b0 22 73 69 7a 65 3d 28 72 69 67 68 74 2d 6c 65 66 |"size=(right-lef| 000002c0 74 29 2a 28 74 6f 70 2d 62 6f 74 74 6f 6d 29 0d |t)*(top-bottom).| 000002d0 01 5e 0e 6e 75 6c 6c 3d b3 28 2d 91 29 0d 01 68 |.^.null=.(-.)..h| 000002e0 28 61 74 6f 70 3d 31 2e 33 20 3a 20 61 62 6f 74 |(atop=1.3 : abot| 000002f0 3d 30 20 3a 20 61 72 61 6e 67 65 3d 61 74 6f 70 |=0 : arange=atop| 00000300 2d 61 62 6f 74 0d 01 72 26 62 74 6f 70 3d 32 20 |-abot..r&btop=2 | 00000310 3a 20 62 62 6f 74 3d 30 20 3a 20 62 72 61 6e 67 |: bbot=0 : brang| 00000320 65 3d 62 74 6f 70 2d 62 62 6f 74 0d 01 7c 2d f1 |e=btop-bbot..|-.| 00000330 22 54 48 4f 4d 41 53 49 4e 41 20 97 20 54 68 65 |"THOMASINA . The| 00000340 20 42 61 72 6e 65 73 2d 41 69 6e 73 77 6f 72 74 | Barnes-Ainswort| 00000350 68 20 43 75 72 76 65 22 0d 01 86 24 f1 22 50 72 |h Curve"...$."Pr| 00000360 6f 67 72 61 6d 20 a9 20 31 39 39 34 20 4d 61 72 |ogram . 1994 Mar| 00000370 6b 20 41 69 6e 73 77 6f 72 74 68 22 0d 01 90 29 |k Ainsworth"...)| 00000380 f1 27 22 55 73 65 20 2b 20 61 6e 64 20 2d 20 74 |.'"Use + and - t| 00000390 6f 20 61 6c 74 65 72 20 67 72 65 79 20 73 68 61 |o alter grey sha| 000003a0 64 65 73 2e 22 0d 01 9a 36 f1 22 50 72 65 73 73 |des."...6."Press| 000003b0 20 53 65 6c 65 63 74 20 74 6f 20 7a 6f 6f 6d 2c | Select to zoom,| 000003c0 20 61 6e 64 20 74 68 65 6e 20 64 72 61 67 20 61 | and then drag a| 000003d0 20 7a 6f 6f 6d 20 62 6f 78 2e 22 0d 01 a4 2a f1 | zoom box."...*.| 000003e0 27 27 22 50 72 65 73 73 20 52 45 54 55 52 4e 20 |''"Press RETURN | 000003f0 66 6f 72 20 72 61 6e 64 6f 6d 20 76 61 6c 75 65 |for random value| 00000400 73 2e 2e 2e 22 0d 01 ae 13 e8 20 8a 31 2c 38 29 |s..."..... .1,8)| 00000410 22 61 20 3d 20 22 61 24 0d 01 b8 0d e7 20 61 24 |"a = "a$..... a$| 00000420 3d 22 22 20 8c 0d 01 c2 18 20 20 61 3d 61 72 61 |="" ..... a=ara| 00000430 6e 67 65 2a b3 28 31 29 2b 61 62 6f 74 0d 01 cc |nge*.(1)+abot...| 00000440 05 cc 0d 01 d6 0d 20 20 61 3d bb 28 61 24 29 0d |...... a=.(a$).| 00000450 01 e0 05 cd 0d 01 ea 0c f1 20 8a 35 2c 38 29 61 |......... .5,8)a| 00000460 0d 01 f4 13 e8 20 8a 31 2c 39 29 22 62 20 3d 20 |..... .1,9)"b = | 00000470 22 62 24 0d 01 fe 0d e7 20 62 24 3d 22 22 20 8c |"b$..... b$="" .| 00000480 0d 02 08 18 20 20 62 3d 62 72 61 6e 67 65 2a b3 |.... b=brange*.| 00000490 28 31 29 2b 62 62 6f 74 0d 02 12 05 cc 0d 02 1c |(1)+bbot........| 000004a0 0d 20 20 62 3d bb 28 62 24 29 0d 02 26 05 cd 0d |. b=.(b$)..&...| 000004b0 02 30 0c f1 20 8a 35 2c 39 29 62 0d 02 3a 36 e8 |.0.. .5,9)b..:6.| 000004c0 27 22 53 65 74 74 69 6e 67 3f 20 28 46 61 73 74 |'"Setting? (Fast| 000004d0 2f 49 6e 66 6f 2f 4e 6f 72 6d 61 6c 20 3a 20 31 |/Info/Normal : 1| 000004e0 73 74 20 6c 65 74 74 65 72 29 20 22 69 6e 66 6f |st letter) "info| 000004f0 24 0d 02 44 0b 66 61 73 74 25 3d a3 0d 02 4e 0b |$..D.fast%=...N.| 00000500 69 6e 66 6f 25 3d a3 0d 02 58 0e c8 8e 20 69 6e |info%=...X... in| 00000510 66 6f 24 20 ca 0d 02 62 19 20 20 c9 20 22 46 22 |fo$ ...b. . "F"| 00000520 2c 22 66 22 20 3a 20 66 61 73 74 25 3d b9 0d 02 |,"f" : fast%=...| 00000530 6c 19 20 20 c9 20 22 49 22 2c 22 69 22 20 3a 20 |l. . "I","i" : | 00000540 69 6e 66 6f 25 3d b9 0d 02 76 05 cb 0d 02 80 19 |info%=...v......| 00000550 e8 27 22 52 65 70 65 74 69 74 69 6f 6e 73 22 3b |.'"Repetitions";| 00000560 72 65 70 73 25 0d 02 8a 0b f2 66 61 63 74 6f 72 |reps%.....factor| 00000570 0d 02 94 0d f2 72 65 63 6f 6c 6f 75 72 0d 02 9e |.....recolour...| 00000580 0b f2 72 65 73 69 7a 65 0d 02 a8 05 e1 0d 02 b2 |..resize........| 00000590 05 3a 0d 02 bc 0f dd 20 f2 72 65 63 6f 6c 6f 75 |.:..... .recolou| 000005a0 72 0d 02 c6 2b e7 20 63 6f 6c 6f 75 72 73 25 3e |r...+. colours%>| 000005b0 6d 61 78 63 6f 6c 73 25 20 8c 20 63 6f 6c 6f 75 |maxcols% . colou| 000005c0 72 73 25 3d 6d 61 78 63 6f 6c 73 25 0d 02 d0 1d |rs%=maxcols%....| 000005d0 e7 20 63 6f 6c 6f 75 72 73 25 3d 30 20 8c 20 63 |. colours%=0 . c| 000005e0 6f 6c 6f 75 72 73 25 3d 31 0d 02 da 17 e3 20 63 |olours%=1..... c| 000005f0 6f 6c 25 3d 30 20 b8 20 63 6f 6c 6f 75 72 73 25 |ol%=0 . colours%| 00000600 0d 02 e4 24 20 20 67 72 61 64 65 25 3d 32 35 35 |...$ grade%=255| 00000610 2d 63 6f 6c 25 2a 28 32 35 35 2f 63 6f 6c 6f 75 |-col%*(255/colou| 00000620 72 73 25 29 0d 02 ee 21 20 20 fb 20 63 6f 6c 25 |rs%)...! . col%| 00000630 2c 67 72 61 64 65 25 2c 67 72 61 64 65 25 2c 67 |,grade%,grade%,g| 00000640 72 61 64 65 25 0d 02 f8 0a ed 20 63 6f 6c 25 0d |rade%..... col%.| 00000650 03 02 13 63 6f 6c 25 3d 63 6f 6c 6f 75 72 73 25 |...col%=colours%| 00000660 2b 31 0d 03 0c 15 c8 95 20 63 6f 6c 25 3c 3d 6d |+1...... col%<=m| 00000670 61 78 63 6f 6c 73 25 0d 03 16 12 20 20 fb 20 63 |axcols%.... . c| 00000680 6f 6c 25 2c 30 2c 30 2c 30 0d 03 20 0d 20 20 63 |ol%,0,0,0.. . c| 00000690 6f 6c 25 2b 3d 31 0d 03 2a 05 ce 0d 03 34 13 62 |ol%+=1..*....4.b| 000006a0 6c 61 63 6b 25 3d 6d 61 78 63 6f 6c 73 25 0d 03 |lack%=maxcols%..| 000006b0 3e 05 e1 0d 03 48 05 3a 0d 03 52 0d dd 20 f2 72 |>....H.:..R.. .r| 000006c0 65 73 69 7a 65 0d 03 5c 1f 78 66 61 63 74 6f 72 |esize..\.xfactor| 000006d0 3d 77 69 64 74 68 25 2f 28 72 69 67 68 74 2d 6c |=width%/(right-l| 000006e0 65 66 74 29 0d 03 66 20 79 66 61 63 74 6f 72 3d |eft)..f yfactor=| 000006f0 68 65 69 67 68 74 25 2f 28 74 6f 70 2d 62 6f 74 |height%/(top-bot| 00000700 74 6f 6d 29 0d 03 70 23 6d 69 64 78 25 3d 2d 6c |tom)..p#midx%=-l| 00000710 65 66 74 2a 77 69 64 74 68 25 2f 28 72 69 67 68 |eft*width%/(righ| 00000720 74 2d 6c 65 66 74 29 0d 03 7a 26 6d 69 64 79 25 |t-left)..z&midy%| 00000730 3d 2d 62 6f 74 74 6f 6d 2a 68 65 69 67 68 74 25 |=-bottom*height%| 00000740 2f 28 74 6f 70 2d 62 6f 74 74 6f 6d 29 0d 03 84 |/(top-bottom)...| 00000750 14 ef 32 39 2c 6d 69 64 78 25 3b 6d 69 64 79 25 |..29,midx%;midy%| 00000760 3b 0d 03 8e 05 e1 0d 03 98 05 3a 0d 03 a2 0b dd |;.........:.....| 00000770 20 f2 70 6c 6f 74 0d 03 ac 08 78 6e 3d 30 0d 03 | .plot....xn=0..| 00000780 b6 08 79 6e 3d 30 0d 03 c0 27 e3 20 78 25 3d 2d |..yn=0...'. x%=-| 00000790 6d 69 64 78 25 20 b8 20 77 69 64 74 68 25 2d 6d |midx% . width%-m| 000007a0 69 64 78 25 20 88 20 78 73 74 65 70 25 0d 03 ca |idx% . xstep%...| 000007b0 0c 20 20 6e 65 77 25 3d b9 0d 03 d4 2a 20 20 e3 |. new%=....* .| 000007c0 20 79 25 3d 2d 6d 69 64 79 25 20 b8 20 68 65 69 | y%=-midy% . hei| 000007d0 67 68 74 25 2d 6d 69 64 79 25 20 88 20 79 73 74 |ght%-midy% . yst| 000007e0 65 70 25 0d 03 de 14 20 20 20 20 78 3d 78 25 2f |ep%.... x=x%/| 000007f0 78 66 61 63 74 6f 72 0d 03 e8 14 20 20 20 20 79 |xfactor.... y| 00000800 3d 79 25 2f 79 66 61 63 74 6f 72 0d 03 f2 1a 20 |=y%/yfactor.... | 00000810 20 20 20 e3 20 63 6f 75 6e 74 25 3d 31 20 b8 20 | . count%=1 . | 00000820 72 65 70 73 25 0d 03 fc 1d 20 20 20 20 20 20 78 |reps%.... x| 00000830 3d b6 28 94 28 78 2a 78 2d 32 2a 78 2b 61 29 29 |=.(.(x*x-2*x+a))| 00000840 2d 79 0d 04 06 1d 20 20 20 20 20 20 79 3d b6 28 |-y.... y=.(| 00000850 94 28 79 2a 79 2d 32 2a 79 2d 62 29 29 2b 78 0d |.(y*y-2*y-b))+x.| 00000860 04 10 10 20 20 20 20 ed 20 63 6f 75 6e 74 25 0d |... . count%.| 00000870 04 1a 27 20 20 20 20 e7 20 ac 20 66 61 73 74 25 |..' . . fast%| 00000880 20 8c 20 f2 73 6c 6f 77 20 8b 20 63 6f 6c 25 3d | . .slow . col%=| 00000890 62 6c 61 63 6b 25 0d 04 24 10 20 20 20 20 e6 20 |black%..$. . | 000008a0 30 2c 63 6f 6c 25 0d 04 2e 1f 20 20 20 20 c8 92 |0,col%.... ..| 000008b0 20 78 66 61 63 74 6f 72 2a 78 2c 20 79 66 61 63 | xfactor*x, yfac| 000008c0 74 6f 72 2a 79 0d 04 38 0a 20 20 ed 20 79 25 0d |tor*y..8. . y%.| 000008d0 04 42 08 ed 20 78 25 0d 04 4c 05 e1 0d 04 56 05 |.B.. x%..L....V.| 000008e0 3a 0d 04 60 0b dd 20 f2 73 6c 6f 77 0d 04 6a 13 |:..`.. .slow..j.| 000008f0 e7 20 69 6e 66 6f 25 20 8c 20 f2 69 6e 66 6f 0d |. info% . .info.| 00000900 04 74 0b 47 24 3d bf 28 30 29 0d 04 7e 0e e7 20 |.t.G$=.(0)..~.. | 00000910 47 24 3c 3e 22 22 20 8c 0d 04 88 42 20 20 e7 20 |G$<>"" ....B . | 00000920 47 24 3d 22 2d 22 20 80 20 63 6f 6c 6f 75 72 73 |G$="-" . colours| 00000930 25 3c 6d 61 78 63 6f 6c 73 25 20 8c 20 63 6f 6c |%<maxcols% . col| 00000940 6f 75 72 73 25 3d 63 6f 6c 6f 75 72 73 25 2a 32 |ours%=colours%*2| 00000950 3a f2 72 65 63 6f 6c 6f 75 72 0d 04 92 3b 20 20 |:.recolour...; | 00000960 e7 20 47 24 3d 22 2b 22 20 80 20 63 6f 6c 6f 75 |. G$="+" . colou| 00000970 72 73 25 3e 32 20 8c 20 63 6f 6c 6f 75 72 73 25 |rs%>2 . colours%| 00000980 3d 63 6f 6c 6f 75 72 73 25 2f 32 3a f2 72 65 63 |=colours%/2:.rec| 00000990 6f 6c 6f 75 72 0d 04 9c 05 cd 0d 04 a6 1f 63 6f |olour.........co| 000009a0 6c 25 3d b0 78 66 61 63 74 6f 72 2a 78 2c 20 79 |l%=.xfactor*x, y| 000009b0 66 61 63 74 6f 72 2a 79 29 0d 04 b0 1d e7 20 63 |factor*y)..... c| 000009c0 6f 6c 25 3c 6d 61 78 63 6f 6c 73 25 20 8c 20 63 |ol%<maxcols% . c| 000009d0 6f 6c 25 2b 3d 31 0d 04 ba 05 e1 0d 04 c4 05 3a |ol%+=1.........:| 000009e0 0d 04 ce 0b dd 20 f2 69 6e 66 6f 0d 04 d8 0e e7 |..... .info.....| 000009f0 20 ac 20 6e 65 77 25 20 8c 0d 04 e2 0b 20 20 78 | . new% ..... x| 00000a00 70 3d 78 6e 0d 04 ec 0b 20 20 79 70 3d 79 6e 0d |p=xn.... yp=yn.| 00000a10 04 f6 12 20 20 e6 20 33 2c 63 6f 6c 6f 75 72 73 |... . 3,colours| 00000a20 25 0d 05 00 12 20 20 78 6e 3d 78 2a 78 66 61 63 |%.... xn=x*xfac| 00000a30 74 6f 72 0d 05 0a 12 20 20 79 6e 3d 79 2a 79 66 |tor.... yn=y*yf| 00000a40 61 63 74 6f 72 0d 05 14 15 20 20 ec 20 78 70 2c |actor.... . xp,| 00000a50 79 70 3a df 20 78 6e 2c 79 6e 0d 05 1e 25 20 20 |yp:. xn,yn...% | 00000a60 f2 70 6f 69 6e 74 28 78 25 2f 78 66 61 63 74 6f |.point(x%/xfacto| 00000a70 72 2c 79 25 2f 79 66 61 63 74 6f 72 2c 30 29 0d |r,y%/yfactor,0).| 00000a80 05 28 13 20 20 f2 70 6c 61 63 65 28 78 25 2c 79 |.(. .place(x%,y| 00000a90 25 29 0d 05 32 08 20 20 c8 96 0d 05 3c 15 20 20 |%)..2. ....<. | 00000aa0 ec 20 78 70 2c 79 70 3a df 20 78 6e 2c 79 6e 0d |. xp,yp:. xn,yn.| 00000ab0 05 46 13 20 20 f2 70 6c 61 63 65 28 78 25 2c 79 |.F. .place(x%,y| 00000ac0 25 29 0d 05 50 05 cc 0d 05 5a 12 20 20 78 70 3d |%)..P....Z. xp=| 00000ad0 78 2a 78 66 61 63 74 6f 72 0d 05 64 12 20 20 79 |x*xfactor..d. y| 00000ae0 70 3d 79 2a 79 66 61 63 74 6f 72 0d 05 6e 0c 20 |p=y*yfactor..n. | 00000af0 20 6e 65 77 25 3d a3 0d 05 78 05 cd 0d 05 82 05 | new%=...x......| 00000b00 e1 0d 05 8c 05 3a 0d 05 96 0b dd 20 f2 7a 6f 6f |.....:..... .zoo| 00000b10 6d 0d 05 a0 08 c8 97 20 ee 0d 05 aa 19 f5 3a c8 |m...... ......:.| 00000b20 97 20 58 25 2c 59 25 2c 54 25 3a fd 20 54 25 3c |. X%,Y%,T%:. T%<| 00000b30 3e 34 0d 05 b4 10 e6 20 33 2c 63 6f 6c 6f 75 72 |>4..... 3,colour| 00000b40 73 25 0d 05 be 05 f5 0d 05 c8 11 20 20 c8 97 20 |s%......... .. | 00000b50 58 25 2c 59 25 2c 54 25 0d 05 d2 0d 20 20 47 24 |X%,Y%,T%.... G$| 00000b60 3d bf 28 30 29 0d 05 dc 10 20 20 e7 20 47 24 3c |=.(0).... . G$<| 00000b70 3e 22 22 20 8c 0d 05 e6 44 20 20 20 20 e7 20 47 |>"" ....D . G| 00000b80 24 3d 22 2d 22 20 80 20 63 6f 6c 6f 75 72 73 25 |$="-" . colours%| 00000b90 3c 6d 61 78 63 6f 6c 73 25 20 8c 20 63 6f 6c 6f |<maxcols% . colo| 00000ba0 75 72 73 25 3d 63 6f 6c 6f 75 72 73 25 2a 32 3a |urs%=colours%*2:| 00000bb0 f2 72 65 63 6f 6c 6f 75 72 0d 05 f0 3d 20 20 20 |.recolour...= | 00000bc0 20 e7 20 47 24 3d 22 2b 22 20 80 20 63 6f 6c 6f | . G$="+" . colo| 00000bd0 75 72 73 25 3e 32 20 8c 20 63 6f 6c 6f 75 72 73 |urs%>2 . colours| 00000be0 25 3d 63 6f 6c 6f 75 72 73 25 2f 32 3a f2 72 65 |%=colours%/2:.re| 00000bf0 63 6f 6c 6f 75 72 0d 05 fa 4b 20 20 20 20 e7 20 |colour...K . | 00000c00 47 24 3d 22 73 22 20 84 20 47 24 3d 22 53 22 20 |G$="s" . G$="S" | 00000c10 8c 20 ff 28 22 53 63 72 65 65 6e 73 61 76 65 20 |. .("Screensave | 00000c20 54 68 6f 6d 61 73 69 6e 61 22 2b c3 28 73 63 72 |Thomasina"+.(scr| 00000c30 65 65 6e 25 29 29 3a 73 63 72 65 65 6e 25 2b 3d |een%)):screen%+=| 00000c40 31 0d 06 04 07 20 20 cd 0d 06 0e 0c 20 20 f2 63 |1.... ..... .c| 00000c50 6f 6f 72 64 0d 06 18 0a fd 20 54 25 3d 34 0d 06 |oord..... T%=4..| 00000c60 22 0a 58 31 25 3d 58 25 0d 06 2c 0a 59 31 25 3d |".X1%=X%..,.Y1%=| 00000c70 59 25 0d 06 36 0b 58 32 25 3d 58 31 25 0d 06 40 |Y%..6.X2%=X1%..@| 00000c80 0b 59 32 25 3d 59 31 25 0d 06 4a 0e f2 72 65 63 |.Y2%=Y1%..J..rec| 00000c90 74 61 6e 67 6c 65 0d 06 54 05 f5 0d 06 5e 10 20 |tangle..T....^. | 00000ca0 20 f2 72 65 63 74 61 6e 67 6c 65 0d 06 68 11 20 | .rectangle..h. | 00000cb0 20 c8 97 20 58 25 2c 59 25 2c 54 25 0d 06 72 0c | .. X%,Y%,T%..r.| 00000cc0 20 20 58 32 25 3d 58 25 0d 06 7c 0c 20 20 59 32 | X2%=X%..|. Y2| 00000cd0 25 3d 59 25 0d 06 86 0c 20 20 f2 63 6f 6f 72 64 |%=Y%.... .coord| 00000ce0 0d 06 90 0c 20 20 f2 73 69 64 65 73 0d 06 9a 10 |.... .sides....| 00000cf0 20 20 f2 72 65 63 74 61 6e 67 6c 65 0d 06 a4 08 | .rectangle....| 00000d00 20 20 c8 96 0d 06 ae 0a fd 20 54 25 3c 34 0d 06 | ....... T%<4..| 00000d10 b8 0b f2 72 65 73 69 7a 65 0d 06 c2 0b f2 66 61 |...resize.....fa| 00000d20 63 74 6f 72 0d 06 cc 0d f2 72 65 63 6f 6c 6f 75 |ctor.....recolou| 00000d30 72 0d 06 d6 08 c8 97 20 87 0d 06 e0 05 e1 0d 06 |r...... ........| 00000d40 ea 05 3a 0d 06 f4 0c dd 20 f2 63 6f 6f 72 64 0d |..:..... .coord.| 00000d50 06 fe 0c fb 20 62 6c 61 63 6b 25 0d 07 08 1b f1 |.... black%.....| 00000d60 20 8a 30 2c 32 29 22 78 3d 20 22 3b 58 25 2f 78 | .0,2)"x= ";X%/x| 00000d70 66 61 63 74 6f 72 0d 07 12 1b f1 20 8a 30 2c 33 |factor..... .0,3| 00000d80 29 22 79 3d 20 22 3b 59 25 2f 79 66 61 63 74 6f |)"y= ";Y%/yfacto| 00000d90 72 0d 07 1c 05 e1 0d 07 26 05 3a 0d 07 30 10 dd |r.......&.:..0..| 00000da0 20 f2 72 65 63 74 61 6e 67 6c 65 0d 07 3a 22 c8 | .rectangle..:".| 00000db0 93 20 58 31 25 2c 59 31 25 2c 28 58 32 25 2d 58 |. X1%,Y1%,(X2%-X| 00000dc0 31 25 29 2c 28 59 32 25 2d 59 31 25 29 0d 07 44 |1%),(Y2%-Y1%)..D| 00000dd0 05 e1 0d 07 4e 05 3a 0d 07 58 0d dd 20 f2 66 61 |....N.:..X.. .fa| 00000de0 63 74 6f 72 0d 07 62 21 e7 20 6c 65 66 74 3c 3e |ctor..b!. left<>| 00000df0 72 69 67 68 74 20 80 20 74 6f 70 3c 3e 62 6f 74 |right . top<>bot| 00000e00 74 6f 6d 20 8c 0d 07 6c 33 20 20 66 61 63 74 6f |tom ...l3 facto| 00000e10 72 3d 28 28 28 72 69 67 68 74 2d 6c 65 66 74 29 |r=(((right-left)| 00000e20 2a 28 74 6f 70 2d 62 6f 74 74 6f 6d 29 29 2f 73 |*(top-bottom))/s| 00000e30 69 7a 65 29 5e 30 2e 35 0d 07 76 05 cc 0d 07 80 |ize)^0.5..v.....| 00000e40 0e 20 20 66 61 63 74 6f 72 3d 30 0d 07 8a 05 cd |. factor=0.....| 00000e50 0d 07 94 1c 63 6f 6c 6f 75 72 73 25 3d 6d 61 78 |....colours%=max| 00000e60 63 6f 6c 73 25 2a 66 61 63 74 6f 72 0d 07 9e 18 |cols%*factor....| 00000e70 e7 20 66 61 73 74 25 20 8c 20 63 6f 6c 6f 75 72 |. fast% . colour| 00000e80 73 25 3d 31 0d 07 a8 05 e1 0d 07 b2 05 3a 0d 07 |s%=1.........:..| 00000e90 bc 0c dd 20 f2 73 69 64 65 73 0d 07 c6 14 6c 65 |... .sides....le| 00000ea0 66 74 3d 58 31 25 2f 78 66 61 63 74 6f 72 0d 07 |ft=X1%/xfactor..| 00000eb0 d0 15 72 69 67 68 74 3d 58 32 25 2f 78 66 61 63 |..right=X2%/xfac| 00000ec0 74 6f 72 0d 07 da 13 74 6f 70 3d 59 31 25 2f 79 |tor....top=Y1%/y| 00000ed0 66 61 63 74 6f 72 0d 07 e4 16 62 6f 74 74 6f 6d |factor....bottom| 00000ee0 3d 59 32 25 2f 79 66 61 63 74 6f 72 0d 07 ee 32 |=Y2%/yfactor...2| 00000ef0 e7 20 6c 65 66 74 3e 72 69 67 68 74 20 8c 20 74 |. left>right . t| 00000f00 65 6d 70 3d 6c 65 66 74 3a 6c 65 66 74 3d 72 69 |emp=left:left=ri| 00000f10 67 68 74 3a 72 69 67 68 74 3d 74 65 6d 70 0d 07 |ght:right=temp..| 00000f20 f8 32 e7 20 62 6f 74 74 6f 6d 3e 74 6f 70 20 8c |.2. bottom>top .| 00000f30 20 74 65 6d 70 3d 62 6f 74 74 6f 6d 3a 62 6f 74 | temp=bottom:bot| 00000f40 74 6f 6d 3d 74 6f 70 3a 74 6f 70 3d 74 65 6d 70 |tom=top:top=temp| 00000f50 0d 08 02 05 e1 0d 08 0c 05 3a 0d 08 16 10 dd 20 |.........:..... | 00000f60 f2 6f 72 69 67 69 6e 28 73 29 0d 08 20 0e e6 20 |.origin(s).. .. | 00000f70 30 2c 62 6c 61 63 6b 25 0d 08 2a 0a 73 73 3d 73 |0,black%..*.ss=s| 00000f80 2f 38 0d 08 34 15 ec 20 30 2c 73 3a df 20 30 2c |/8..4.. 0,s:. 0,| 00000f90 30 3a df 20 73 2c 30 0d 08 3e 1e ec 20 2d 73 73 |0:. s,0..>.. -ss| 00000fa0 2c 73 2d 73 73 3a df 20 30 2c 73 3a df 20 73 73 |,s-ss:. 0,s:. ss| 00000fb0 2c 73 2d 73 73 0d 08 48 1e ec 20 73 2d 73 73 2c |,s-ss..H.. s-ss,| 00000fc0 2d 73 73 3a df 20 73 2c 30 3a df 20 73 2d 73 73 |-ss:. s,0:. s-ss| 00000fd0 2c 73 73 0d 08 52 05 e1 0d 08 5c 05 3a 0d 08 66 |,ss..R....\.:..f| 00000fe0 13 dd 20 f2 70 6f 69 6e 74 28 78 2c 79 2c 70 29 |.. .point(x,y,p)| 00000ff0 0d 08 70 28 f1 20 8a 30 2c 33 2b 70 29 22 28 22 |..p(. .0,3+p)"("| 00001000 3b c3 28 78 29 3b 22 2c 22 3b c3 28 79 29 3b 22 |;.(x);",";.(y);"| 00001010 29 20 20 20 20 20 20 22 0d 08 7a 05 e1 0d 08 84 |) "..z.....| 00001020 05 3a 0d 08 8e 13 dd 20 f2 70 6c 61 63 65 28 78 |.:..... .place(x| 00001030 25 2c 79 25 29 0d 08 98 0f c8 8f 20 78 25 2c 79 |%,y%)...... x%,y| 00001040 25 2c 31 36 0d 08 a2 0c c8 92 20 78 25 2c 79 25 |%,16...... x%,y%| 00001050 0d 08 ac 05 e1 0d ff |.......| 00001057