Home » Personal collection » Acorn ADFS disks » Electron » Finished_programs.ADF » TAPE3/B/FRACTALS

TAPE3/B/FRACTALS

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 » Finished_programs.ADF
Filename: TAPE3/B/FRACTALS
Read OK:
File size: 03C7 bytes
Load address: FFFF0E00
Exec address: FFFF8023
Duplicates

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

File contents
   10 REM Fern
   20 DATA 4,120,520,0,0,0,0,.16,0,0,.85,.04,-.04,.85,0,1.6,.2,-.26,.23,.22,0,1.6,-.15,.28,.26,.24,0,.44
   30 REM Tree
   40 DATA 4,2000,600,0,0,0,0,.5,0,0,.42,-.42,.42,.42,0,.2,.42,.42,-.42,.42,0,.2,.1,0,0,.1,0,.2
   50 REM Sierpinski triangle
   60 DATA 3,10,0,0,.5,0,0,.5,1,1,.5,0,0,.5,1,50,.5,0,0,.5,50,50
   70 REM Figure
   80 DATA 4,1024,0,0,0,-.5,.5,0,.5,0,.5,0,0,.5,0,.5,0,.5,-.5,0,.5,1,.333,0,0,.333,.333,.333
   90 MODE 6
  100 PRINT
  110 PRINT"Which fractal?":PRINT"1. Fern":PRINT"2. Tree":PRINT"3. Sierpinski triangle":PRINT"4. Figure"
  120 K$=GET$
  130 RESTORE 20
  140 IF K$="2" THEN RESTORE 40
  150 IF K$="3" THEN RESTORE 60 
  160 IF K$="4" THEN RESTORE 80
  170 MODE 4
  180 VDU 23,1,0;0;0;0;
  190 VDU 19,0,7;0;19,1,0;0;:CLS
  200 PROCINIT
  210 PROCREC(9,0,0)
  220 END
  230 DEFPROCREC(L,X,Y)
  240 IF L=1 PLOT 69,SC*X+XS,SC*Y+YS:ENDPROC
  250 LOCAL Q%
  260 FOR Q%=0 TO N%
  270 PROCREC(L-1,X*A(Q%)+Y*B(Q%)+E(Q%),X*C(Q%)+Y*D(Q%)+F(Q%))
  280 NEXT
  290 ENDPROC
  300 DEFPROCINIT
  310 READ N%,SC,XS,YS:N%=N%-1
  320 DIM A(N%),B(N%),C(N%),D(N%),E(N%),F(N%)
  330 FOR Q%=0 TO N%
  340 READ A(Q%),B(Q%),C(Q%),D(Q%),E(Q%),F(Q%)
  350 NEXT
  360 ENDPROC

 � Fern
d � 4,120,520,0,0,0,0,.16,0,0,.85,.04,-.04,.85,0,1.6,.2,-.26,.23,.22,0,1.6,-.15,.28,.26,.24,0,.44
 � Tree
([ � 4,2000,600,0,0,0,0,.5,0,0,.42,-.42,.42,.42,0,.2,.42,.42,-.42,.42,0,.2,.1,0,0,.1,0,.2
2 � Sierpinski triangle
<< � 3,10,0,0,.5,0,0,.5,1,1,.5,0,0,.5,1,50,.5,0,0,.5,50,50
F
 � Figure
PX � 4,1024,0,0,0,-.5,.5,0,.5,0,.5,0,0,.5,0,.5,0,.5,-.5,0,.5,1,.333,0,0,.333,.333,.333
Z � 6
d �
nS �"Which fractal?":�"1. Fern":�"2. Tree":�"3. Sierpinski triangle":�"4. Figure"
x	 K$=�
� � �TT@
� � K$="2" � � �Th@
� � K$="3" � � �T|@ 
� � K$="4" � � �DP@
� � 4
� � 23,1,0;0;0;0;
� � 19,0,7;0;19,1,0;0;:�
�
 �INIT
� �REC(9,0,0)
� �
� ��REC(L,X,Y)
�! � L=1 � 69,SC*X+XS,SC*Y+YS:�
�	 � Q%
 � Q%=0 � N%
: �REC(L-1,X*A(Q%)+Y*B(Q%)+E(Q%),X*C(Q%)+Y*D(Q%)+F(Q%))
 �
" �
, ��INIT
6 � N%,SC,XS,YS:N%=N%-1
@* � A(N%),B(N%),C(N%),D(N%),E(N%),F(N%)
J � Q%=0 � N%
T* � A(Q%),B(Q%),C(Q%),D(Q%),E(Q%),F(Q%)
^ �
h �
�
00000000  0d 00 0a 0b 20 f4 20 46  65 72 6e 0d 00 14 64 20  |.... . Fern...d |
00000010  dc 20 34 2c 31 32 30 2c  35 32 30 2c 30 2c 30 2c  |. 4,120,520,0,0,|
00000020  30 2c 30 2c 2e 31 36 2c  30 2c 30 2c 2e 38 35 2c  |0,0,.16,0,0,.85,|
00000030  2e 30 34 2c 2d 2e 30 34  2c 2e 38 35 2c 30 2c 31  |.04,-.04,.85,0,1|
00000040  2e 36 2c 2e 32 2c 2d 2e  32 36 2c 2e 32 33 2c 2e  |.6,.2,-.26,.23,.|
00000050  32 32 2c 30 2c 31 2e 36  2c 2d 2e 31 35 2c 2e 32  |22,0,1.6,-.15,.2|
00000060  38 2c 2e 32 36 2c 2e 32  34 2c 30 2c 2e 34 34 0d  |8,.26,.24,0,.44.|
00000070  00 1e 0b 20 f4 20 54 72  65 65 0d 00 28 5b 20 dc  |... . Tree..([ .|
00000080  20 34 2c 32 30 30 30 2c  36 30 30 2c 30 2c 30 2c  | 4,2000,600,0,0,|
00000090  30 2c 30 2c 2e 35 2c 30  2c 30 2c 2e 34 32 2c 2d  |0,0,.5,0,0,.42,-|
000000a0  2e 34 32 2c 2e 34 32 2c  2e 34 32 2c 30 2c 2e 32  |.42,.42,.42,0,.2|
000000b0  2c 2e 34 32 2c 2e 34 32  2c 2d 2e 34 32 2c 2e 34  |,.42,.42,-.42,.4|
000000c0  32 2c 30 2c 2e 32 2c 2e  31 2c 30 2c 30 2c 2e 31  |2,0,.2,.1,0,0,.1|
000000d0  2c 30 2c 2e 32 0d 00 32  1a 20 f4 20 53 69 65 72  |,0,.2..2. . Sier|
000000e0  70 69 6e 73 6b 69 20 74  72 69 61 6e 67 6c 65 0d  |pinski triangle.|
000000f0  00 3c 3c 20 dc 20 33 2c  31 30 2c 30 2c 30 2c 2e  |.<< . 3,10,0,0,.|
00000100  35 2c 30 2c 30 2c 2e 35  2c 31 2c 31 2c 2e 35 2c  |5,0,0,.5,1,1,.5,|
00000110  30 2c 30 2c 2e 35 2c 31  2c 35 30 2c 2e 35 2c 30  |0,0,.5,1,50,.5,0|
00000120  2c 30 2c 2e 35 2c 35 30  2c 35 30 0d 00 46 0d 20  |,0,.5,50,50..F. |
00000130  f4 20 46 69 67 75 72 65  0d 00 50 58 20 dc 20 34  |. Figure..PX . 4|
00000140  2c 31 30 32 34 2c 30 2c  30 2c 30 2c 2d 2e 35 2c  |,1024,0,0,0,-.5,|
00000150  2e 35 2c 30 2c 2e 35 2c  30 2c 2e 35 2c 30 2c 30  |.5,0,.5,0,.5,0,0|
00000160  2c 2e 35 2c 30 2c 2e 35  2c 30 2c 2e 35 2c 2d 2e  |,.5,0,.5,0,.5,-.|
00000170  35 2c 30 2c 2e 35 2c 31  2c 2e 33 33 33 2c 30 2c  |5,0,.5,1,.333,0,|
00000180  30 2c 2e 33 33 33 2c 2e  33 33 33 2c 2e 33 33 33  |0,.333,.333,.333|
00000190  0d 00 5a 08 20 eb 20 36  0d 00 64 06 20 f1 0d 00  |..Z. . 6..d. ...|
000001a0  6e 53 20 f1 22 57 68 69  63 68 20 66 72 61 63 74  |nS ."Which fract|
000001b0  61 6c 3f 22 3a f1 22 31  2e 20 46 65 72 6e 22 3a  |al?":."1. Fern":|
000001c0  f1 22 32 2e 20 54 72 65  65 22 3a f1 22 33 2e 20  |."2. Tree":."3. |
000001d0  53 69 65 72 70 69 6e 73  6b 69 20 74 72 69 61 6e  |Sierpinski trian|
000001e0  67 6c 65 22 3a f1 22 34  2e 20 46 69 67 75 72 65  |gle":."4. Figure|
000001f0  22 0d 00 78 09 20 4b 24  3d be 0d 00 82 0b 20 f7  |"..x. K$=..... .|
00000200  20 8d 54 54 40 0d 00 8c  16 20 e7 20 4b 24 3d 22  | .TT@.... . K$="|
00000210  32 22 20 8c 20 f7 20 8d  54 68 40 0d 00 96 17 20  |2" . . .Th@.... |
00000220  e7 20 4b 24 3d 22 33 22  20 8c 20 f7 20 8d 54 7c  |. K$="3" . . .T||
00000230  40 20 0d 00 a0 16 20 e7  20 4b 24 3d 22 34 22 20  |@ .... . K$="4" |
00000240  8c 20 f7 20 8d 44 50 40  0d 00 aa 08 20 eb 20 34  |. . .DP@.... . 4|
00000250  0d 00 b4 14 20 ef 20 32  33 2c 31 2c 30 3b 30 3b  |.... . 23,1,0;0;|
00000260  30 3b 30 3b 0d 00 be 1b  20 ef 20 31 39 2c 30 2c  |0;0;.... . 19,0,|
00000270  37 3b 30 3b 31 39 2c 31  2c 30 3b 30 3b 3a db 0d  |7;0;19,1,0;0;:..|
00000280  00 c8 0a 20 f2 49 4e 49  54 0d 00 d2 10 20 f2 52  |... .INIT.... .R|
00000290  45 43 28 39 2c 30 2c 30  29 0d 00 dc 06 20 e0 0d  |EC(9,0,0).... ..|
000002a0  00 e6 11 20 dd f2 52 45  43 28 4c 2c 58 2c 59 29  |... ..REC(L,X,Y)|
000002b0  0d 00 f0 21 20 e7 20 4c  3d 31 20 f0 20 36 39 2c  |...! . L=1 . 69,|
000002c0  53 43 2a 58 2b 58 53 2c  53 43 2a 59 2b 59 53 3a  |SC*X+XS,SC*Y+YS:|
000002d0  e1 0d 00 fa 09 20 ea 20  51 25 0d 01 04 10 20 e3  |..... . Q%.... .|
000002e0  20 51 25 3d 30 20 b8 20  4e 25 0d 01 0e 3a 20 f2  | Q%=0 . N%...: .|
000002f0  52 45 43 28 4c 2d 31 2c  58 2a 41 28 51 25 29 2b  |REC(L-1,X*A(Q%)+|
00000300  59 2a 42 28 51 25 29 2b  45 28 51 25 29 2c 58 2a  |Y*B(Q%)+E(Q%),X*|
00000310  43 28 51 25 29 2b 59 2a  44 28 51 25 29 2b 46 28  |C(Q%)+Y*D(Q%)+F(|
00000320  51 25 29 29 0d 01 18 06  20 ed 0d 01 22 06 20 e1  |Q%)).... ...". .|
00000330  0d 01 2c 0b 20 dd f2 49  4e 49 54 0d 01 36 1a 20  |..,. ..INIT..6. |
00000340  f3 20 4e 25 2c 53 43 2c  58 53 2c 59 53 3a 4e 25  |. N%,SC,XS,YS:N%|
00000350  3d 4e 25 2d 31 0d 01 40  2a 20 de 20 41 28 4e 25  |=N%-1..@* . A(N%|
00000360  29 2c 42 28 4e 25 29 2c  43 28 4e 25 29 2c 44 28  |),B(N%),C(N%),D(|
00000370  4e 25 29 2c 45 28 4e 25  29 2c 46 28 4e 25 29 0d  |N%),E(N%),F(N%).|
00000380  01 4a 10 20 e3 20 51 25  3d 30 20 b8 20 4e 25 0d  |.J. . Q%=0 . N%.|
00000390  01 54 2a 20 f3 20 41 28  51 25 29 2c 42 28 51 25  |.T* . A(Q%),B(Q%|
000003a0  29 2c 43 28 51 25 29 2c  44 28 51 25 29 2c 45 28  |),C(Q%),D(Q%),E(|
000003b0  51 25 29 2c 46 28 51 25  29 0d 01 5e 06 20 ed 0d  |Q%),F(Q%)..^. ..|
000003c0  01 68 06 20 e1 0d ff                              |.h. ...|
000003c7
TAPE3/B/FRACTALS.m0
TAPE3/B/FRACTALS.m1
TAPE3/B/FRACTALS.m2
TAPE3/B/FRACTALS.m4
TAPE3/B/FRACTALS.m5