Home » Archimedes archive » Archimedes World » AW-1994-12-Disc1.adf » Disk1Dec94 » !AWDec94/Goodies/DrawBasic/!DrawBasic/Library/TestProgs/Recursion1
!AWDec94/Goodies/DrawBasic/!DrawBasic/Library/TestProgs/Recursion1
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 » Archimedes World » AW-1994-12-Disc1.adf » Disk1Dec94 |
Filename: | !AWDec94/Goodies/DrawBasic/!DrawBasic/Library/TestProgs/Recursion1 |
Read OK: | ✔ |
File size: | 0281 bytes |
Load address: | 0000 |
Exec address: | 0000 |
Duplicates
There are 5 duplicate copies of this file in the archive:
- Archimedes archive » Archimedes World » AW-1995-03-Disc1.adf » Disk1Mar95 » !AWMar95/Goodies/DrawBasic/Recursion1
- Archimedes archive » Archimedes World » AW-1995-04-Disc1.adf » Disk1Apr95 » !AWApr95/Goodies/Draw/Recursion1
- Archimedes archive » Archimedes World » AW-1995-01-Disc1.adf » Disk1Jan95 » !AWJan95/Goodies/DrawBasic/!DrawBasic/Library/Recursion1
- Archimedes archive » Archimedes World » AW-1994-12-Disc1.adf » Disk1Dec94 » !AWDec94/Goodies/DrawBasic/!DrawBasic/Library/TestProgs/Recursion1
- Archimedes archive » Archimedes World » AW-1995-05-Disc1.adf » AWMay95_1 » InTheMag/DrawBasic/Recursion1
- Archimedes archive » Archimedes World » AW-1995-02-Disc1.adf » Disk1Feb95 » !AWFeb95/Goodies/DrawBasic/!DrawBasic/Library/Recursion1
File contents
REM ------------------------------------- REM The smaller the parameter "level" is REM the greater the resursion. REM choose level=1/3 REM If you have ARM 3 (or you are patient) 1/9 !!!! REM ------------------------------------- level=1 �Origin(6,6) �WindingRule(0) �Fill(�Black) radius=6 �PathBegin(nest) �@Circle(0,0,radius) �Nest(0,0,radius/3) �PathEnd �Quit DEF �Nest(x,y,radius) LOCAL i% IF radius<level THEN ENDPROC �@Circle(x,y,radius) �Nest(x,y,radius/3) FOR i%=1 TO 6 �@Circle(x+2*radius*COS(i%*2*PI/6),y+2*radius*SIN(i%*2*PI/6),radius) �Nest(x+2*radius*COS(i%*2*PI/6),y+2*radius*SIN(i%*2*PI/6),radius/3) NEXT ENDPROC
00000000 20 52 45 4d 20 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d | REM -----------| 00000010 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d |----------------| 00000020 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 0a 20 52 45 4d 20 |----------. REM | 00000030 54 68 65 20 73 6d 61 6c 6c 65 72 20 74 68 65 20 |The smaller the | 00000040 70 61 72 61 6d 65 74 65 72 20 22 6c 65 76 65 6c |parameter "level| 00000050 22 20 69 73 0a 20 52 45 4d 20 74 68 65 20 67 72 |" is. REM the gr| 00000060 65 61 74 65 72 20 74 68 65 20 72 65 73 75 72 73 |eater the resurs| 00000070 69 6f 6e 2e 0a 20 52 45 4d 20 63 68 6f 6f 73 65 |ion.. REM choose| 00000080 20 6c 65 76 65 6c 3d 31 2f 33 0a 20 52 45 4d 20 | level=1/3. REM | 00000090 49 66 20 79 6f 75 20 68 61 76 65 20 41 52 4d 20 |If you have ARM | 000000a0 33 20 28 6f 72 20 79 6f 75 20 61 72 65 20 70 61 |3 (or you are pa| 000000b0 74 69 65 6e 74 29 20 31 2f 39 20 21 21 21 21 20 |tient) 1/9 !!!! | 000000c0 0a 20 52 45 4d 20 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d |. REM ----------| 000000d0 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d |----------------| 000000e0 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 0a 0a 6c 65 76 |-----------..lev| 000000f0 65 6c 3d 31 0a a0 4f 72 69 67 69 6e 28 36 2c 36 |el=1..Origin(6,6| 00000100 29 0a a0 57 69 6e 64 69 6e 67 52 75 6c 65 28 30 |)..WindingRule(0| 00000110 29 0a a0 46 69 6c 6c 28 bb 42 6c 61 63 6b 29 0a |)..Fill(.Black).| 00000120 72 61 64 69 75 73 3d 36 0a a0 50 61 74 68 42 65 |radius=6..PathBe| 00000130 67 69 6e 28 6e 65 73 74 29 0a a0 40 43 69 72 63 |gin(nest)..@Circ| 00000140 6c 65 28 30 2c 30 2c 72 61 64 69 75 73 29 0a a0 |le(0,0,radius)..| 00000150 4e 65 73 74 28 30 2c 30 2c 72 61 64 69 75 73 2f |Nest(0,0,radius/| 00000160 33 29 0a a0 50 61 74 68 45 6e 64 0a a0 51 75 69 |3)..PathEnd..Qui| 00000170 74 0a 0a 44 45 46 20 a0 4e 65 73 74 28 78 2c 79 |t..DEF .Nest(x,y| 00000180 2c 72 61 64 69 75 73 29 0a 4c 4f 43 41 4c 20 69 |,radius).LOCAL i| 00000190 25 0a 49 46 20 72 61 64 69 75 73 3c 6c 65 76 65 |%.IF radius<leve| 000001a0 6c 20 54 48 45 4e 20 45 4e 44 50 52 4f 43 0a a0 |l THEN ENDPROC..| 000001b0 40 43 69 72 63 6c 65 28 78 2c 79 2c 72 61 64 69 |@Circle(x,y,radi| 000001c0 75 73 29 0a a0 4e 65 73 74 28 78 2c 79 2c 72 61 |us)..Nest(x,y,ra| 000001d0 64 69 75 73 2f 33 29 0a 46 4f 52 20 69 25 3d 31 |dius/3).FOR i%=1| 000001e0 20 54 4f 20 36 0a 20 a0 40 43 69 72 63 6c 65 28 | TO 6. .@Circle(| 000001f0 78 2b 32 2a 72 61 64 69 75 73 2a 43 4f 53 28 69 |x+2*radius*COS(i| 00000200 25 2a 32 2a 50 49 2f 36 29 2c 79 2b 32 2a 72 61 |%*2*PI/6),y+2*ra| 00000210 64 69 75 73 2a 53 49 4e 28 69 25 2a 32 2a 50 49 |dius*SIN(i%*2*PI| 00000220 2f 36 29 2c 72 61 64 69 75 73 29 0a 20 a0 4e 65 |/6),radius). .Ne| 00000230 73 74 28 78 2b 32 2a 72 61 64 69 75 73 2a 43 4f |st(x+2*radius*CO| 00000240 53 28 69 25 2a 32 2a 50 49 2f 36 29 2c 79 2b 32 |S(i%*2*PI/6),y+2| 00000250 2a 72 61 64 69 75 73 2a 53 49 4e 28 69 25 2a 32 |*radius*SIN(i%*2| 00000260 2a 50 49 2f 36 29 2c 72 61 64 69 75 73 2f 33 29 |*PI/6),radius/3)| 00000270 0a 20 4e 45 58 54 20 0a 20 45 4e 44 50 52 4f 43 |. NEXT . ENDPROC| 00000280 0a |.| 00000281