Home » Personal collection » Acorn hard disk » misc » misc2 » dcfprogs/Graphics/Fractal

dcfprogs/Graphics/Fractal

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 hard disk » misc » misc2
Filename: dcfprogs/Graphics/Fractal
Read OK:
File size: 0319 bytes
Load address: 0000
Exec address: 0000
File contents
   10 MODE 4:DIMtri(1,243,2):A=0:tr=0
   20 GCOL0,1:MOVE 15,15:MOVE1015,15:PLOT85,515,1015
   30 tri(0,0,0)=15:tri(0,0,1)=1015:tri(0,0,2)=15:GCOL 0,0
   40 B=ABS(A-1):set=-1:FORl=0 TO tr
   50 MOVE tri(A,l,0)+(tri(A,l,1)-tri(A,l,0))/4,tri(A,l,2)+(tri(A,l,1)-tri(A,l,0))/2
   60 MOVE tri(A,l,1)-(tri(A,l,1)-tri(A,l,0))/4,tri(A,l,2)+(tri(A,l,1)-tri(A,l,0))/2
   70 PLOT85,tri(A,l,0)+(tri(A,l,1)-tri(A,l,0))/2,tri(A,l,2):set=set+1
   80 tri(B,set,0)=tri(A,l,0):tri(B,set,1)=tri(A,l,0)+(tri(A,l,1)-tri(A,l,0))/2
   90 tri(B,set,2)=tri(A,l,2):set=set+1:tri(B,set,1)=tri(A,l,1)
  100 tri(B,set,0)=tri(B,set-1,1):tri(B,set,2)=tri(A,l,2):set=set+1
  110 tri(B,set,0)=tri(A,l,0)+(tri(A,l,1)-tri(A,l,0))/4
  120 tri(B,set,1)=tri(A,l,1)-(tri(A,l,1)-tri(A,l,0))/4
  130 tri(B,set,2)=tri(A,l,2)+(tri(A,l,1)-tri(A,l,0))/2
  140 NEXT:A=B:tr=set:IF tr<225 THEN 40
  150 GOTO150

 � 4:�tri(1,243,2):A=0:tr=0
' �0,1:� 15,15:�1015,15:�85,515,1015
6 tri(0,0,0)=15:tri(0,0,1)=1015:tri(0,0,2)=15:� 0,0
( B=�(A-1):set=-1:�l=0 � tr
2P � tri(A,l,0)+(tri(A,l,1)-tri(A,l,0))/4,tri(A,l,2)+(tri(A,l,1)-tri(A,l,0))/2
<P � tri(A,l,1)-(tri(A,l,1)-tri(A,l,0))/4,tri(A,l,2)+(tri(A,l,1)-tri(A,l,0))/2
FB �85,tri(A,l,0)+(tri(A,l,1)-tri(A,l,0))/2,tri(A,l,2):set=set+1
PN tri(B,set,0)=tri(A,l,0):tri(B,set,1)=tri(A,l,0)+(tri(A,l,1)-tri(A,l,0))/2
Z> tri(B,set,2)=tri(A,l,2):set=set+1:tri(B,set,1)=tri(A,l,1)
dB tri(B,set,0)=tri(B,set-1,1):tri(B,set,2)=tri(A,l,2):set=set+1
n6 tri(B,set,0)=tri(A,l,0)+(tri(A,l,1)-tri(A,l,0))/4
x6 tri(B,set,1)=tri(A,l,1)-(tri(A,l,1)-tri(A,l,0))/4
�6 tri(B,set,2)=tri(A,l,2)+(tri(A,l,1)-tri(A,l,0))/2
�! �:A=B:tr=set:� tr<225 � �Th@
�
 �tV@
�
00000000  0d 00 0a 1f 20 eb 20 34  3a de 74 72 69 28 31 2c  |.... . 4:.tri(1,|
00000010  32 34 33 2c 32 29 3a 41  3d 30 3a 74 72 3d 30 0d  |243,2):A=0:tr=0.|
00000020  00 14 27 20 e6 30 2c 31  3a ec 20 31 35 2c 31 35  |..' .0,1:. 15,15|
00000030  3a ec 31 30 31 35 2c 31  35 3a f0 38 35 2c 35 31  |:.1015,15:.85,51|
00000040  35 2c 31 30 31 35 0d 00  1e 36 20 74 72 69 28 30  |5,1015...6 tri(0|
00000050  2c 30 2c 30 29 3d 31 35  3a 74 72 69 28 30 2c 30  |,0,0)=15:tri(0,0|
00000060  2c 31 29 3d 31 30 31 35  3a 74 72 69 28 30 2c 30  |,1)=1015:tri(0,0|
00000070  2c 32 29 3d 31 35 3a e6  20 30 2c 30 0d 00 28 1e  |,2)=15:. 0,0..(.|
00000080  20 42 3d 94 28 41 2d 31  29 3a 73 65 74 3d 2d 31  | B=.(A-1):set=-1|
00000090  3a e3 6c 3d 30 20 b8 20  74 72 0d 00 32 50 20 ec  |:.l=0 . tr..2P .|
000000a0  20 74 72 69 28 41 2c 6c  2c 30 29 2b 28 74 72 69  | tri(A,l,0)+(tri|
000000b0  28 41 2c 6c 2c 31 29 2d  74 72 69 28 41 2c 6c 2c  |(A,l,1)-tri(A,l,|
000000c0  30 29 29 2f 34 2c 74 72  69 28 41 2c 6c 2c 32 29  |0))/4,tri(A,l,2)|
000000d0  2b 28 74 72 69 28 41 2c  6c 2c 31 29 2d 74 72 69  |+(tri(A,l,1)-tri|
000000e0  28 41 2c 6c 2c 30 29 29  2f 32 0d 00 3c 50 20 ec  |(A,l,0))/2..<P .|
000000f0  20 74 72 69 28 41 2c 6c  2c 31 29 2d 28 74 72 69  | tri(A,l,1)-(tri|
00000100  28 41 2c 6c 2c 31 29 2d  74 72 69 28 41 2c 6c 2c  |(A,l,1)-tri(A,l,|
00000110  30 29 29 2f 34 2c 74 72  69 28 41 2c 6c 2c 32 29  |0))/4,tri(A,l,2)|
00000120  2b 28 74 72 69 28 41 2c  6c 2c 31 29 2d 74 72 69  |+(tri(A,l,1)-tri|
00000130  28 41 2c 6c 2c 30 29 29  2f 32 0d 00 46 42 20 f0  |(A,l,0))/2..FB .|
00000140  38 35 2c 74 72 69 28 41  2c 6c 2c 30 29 2b 28 74  |85,tri(A,l,0)+(t|
00000150  72 69 28 41 2c 6c 2c 31  29 2d 74 72 69 28 41 2c  |ri(A,l,1)-tri(A,|
00000160  6c 2c 30 29 29 2f 32 2c  74 72 69 28 41 2c 6c 2c  |l,0))/2,tri(A,l,|
00000170  32 29 3a 73 65 74 3d 73  65 74 2b 31 0d 00 50 4e  |2):set=set+1..PN|
00000180  20 74 72 69 28 42 2c 73  65 74 2c 30 29 3d 74 72  | tri(B,set,0)=tr|
00000190  69 28 41 2c 6c 2c 30 29  3a 74 72 69 28 42 2c 73  |i(A,l,0):tri(B,s|
000001a0  65 74 2c 31 29 3d 74 72  69 28 41 2c 6c 2c 30 29  |et,1)=tri(A,l,0)|
000001b0  2b 28 74 72 69 28 41 2c  6c 2c 31 29 2d 74 72 69  |+(tri(A,l,1)-tri|
000001c0  28 41 2c 6c 2c 30 29 29  2f 32 0d 00 5a 3e 20 74  |(A,l,0))/2..Z> t|
000001d0  72 69 28 42 2c 73 65 74  2c 32 29 3d 74 72 69 28  |ri(B,set,2)=tri(|
000001e0  41 2c 6c 2c 32 29 3a 73  65 74 3d 73 65 74 2b 31  |A,l,2):set=set+1|
000001f0  3a 74 72 69 28 42 2c 73  65 74 2c 31 29 3d 74 72  |:tri(B,set,1)=tr|
00000200  69 28 41 2c 6c 2c 31 29  0d 00 64 42 20 74 72 69  |i(A,l,1)..dB tri|
00000210  28 42 2c 73 65 74 2c 30  29 3d 74 72 69 28 42 2c  |(B,set,0)=tri(B,|
00000220  73 65 74 2d 31 2c 31 29  3a 74 72 69 28 42 2c 73  |set-1,1):tri(B,s|
00000230  65 74 2c 32 29 3d 74 72  69 28 41 2c 6c 2c 32 29  |et,2)=tri(A,l,2)|
00000240  3a 73 65 74 3d 73 65 74  2b 31 0d 00 6e 36 20 74  |:set=set+1..n6 t|
00000250  72 69 28 42 2c 73 65 74  2c 30 29 3d 74 72 69 28  |ri(B,set,0)=tri(|
00000260  41 2c 6c 2c 30 29 2b 28  74 72 69 28 41 2c 6c 2c  |A,l,0)+(tri(A,l,|
00000270  31 29 2d 74 72 69 28 41  2c 6c 2c 30 29 29 2f 34  |1)-tri(A,l,0))/4|
00000280  0d 00 78 36 20 74 72 69  28 42 2c 73 65 74 2c 31  |..x6 tri(B,set,1|
00000290  29 3d 74 72 69 28 41 2c  6c 2c 31 29 2d 28 74 72  |)=tri(A,l,1)-(tr|
000002a0  69 28 41 2c 6c 2c 31 29  2d 74 72 69 28 41 2c 6c  |i(A,l,1)-tri(A,l|
000002b0  2c 30 29 29 2f 34 0d 00  82 36 20 74 72 69 28 42  |,0))/4...6 tri(B|
000002c0  2c 73 65 74 2c 32 29 3d  74 72 69 28 41 2c 6c 2c  |,set,2)=tri(A,l,|
000002d0  32 29 2b 28 74 72 69 28  41 2c 6c 2c 31 29 2d 74  |2)+(tri(A,l,1)-t|
000002e0  72 69 28 41 2c 6c 2c 30  29 29 2f 32 0d 00 8c 21  |ri(A,l,0))/2...!|
000002f0  20 ed 3a 41 3d 42 3a 74  72 3d 73 65 74 3a e7 20  | .:A=B:tr=set:. |
00000300  74 72 3c 32 32 35 20 8c  20 8d 54 68 40 0d 00 96  |tr<225 . .Th@...|
00000310  0a 20 e5 8d 74 56 40 0d  ff                       |. ..tV@..|
00000319