Home » Archimedes archive » Archimedes World » AW-1995-04-Disc1.adf » Disk1Apr95 » !AWApr95/Goodies/Draw/Recursion2

!AWApr95/Goodies/Draw/Recursion2

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-1995-04-Disc1.adf » Disk1Apr95
Filename: !AWApr95/Goodies/Draw/Recursion2
Read OK:
File size: 0113 bytes
Load address: 0000
Exec address: 0000
File contents
DATA 1,.1
READ R,h
 p=h/2 : a=3*h/2
�Fill(RND)
�WindingRule(0)
�Origin(.1,6)
�PathBegin(path)
  �@Circle(R*R/4/h,0,ABS(R*R/4/h))
  �@Circle(R*R/2/h,0,ABS(R*R/2/h))
FOR b=-20*h TO 20*h STEP h
 I=R*R/(a*a+b*b-p*p)
 A=I*a
 B=I*b
 r=ABS(I)*p
 �@Circle(A,B,r)
 NEXT
�PathEnd
�Quit
00000000  44 41 54 41 20 31 2c 2e  31 0a 52 45 41 44 20 52  |DATA 1,.1.READ R|
00000010  2c 68 0a 20 70 3d 68 2f  32 20 3a 20 61 3d 33 2a  |,h. p=h/2 : a=3*|
00000020  68 2f 32 0a a0 46 69 6c  6c 28 52 4e 44 29 0a a0  |h/2..Fill(RND)..|
00000030  57 69 6e 64 69 6e 67 52  75 6c 65 28 30 29 0a a0  |WindingRule(0)..|
00000040  4f 72 69 67 69 6e 28 2e  31 2c 36 29 0a a0 50 61  |Origin(.1,6)..Pa|
00000050  74 68 42 65 67 69 6e 28  70 61 74 68 29 0a 20 20  |thBegin(path).  |
00000060  a0 40 43 69 72 63 6c 65  28 52 2a 52 2f 34 2f 68  |.@Circle(R*R/4/h|
00000070  2c 30 2c 41 42 53 28 52  2a 52 2f 34 2f 68 29 29  |,0,ABS(R*R/4/h))|
00000080  0a 20 20 a0 40 43 69 72  63 6c 65 28 52 2a 52 2f  |.  .@Circle(R*R/|
00000090  32 2f 68 2c 30 2c 41 42  53 28 52 2a 52 2f 32 2f  |2/h,0,ABS(R*R/2/|
000000a0  68 29 29 0a 46 4f 52 20  62 3d 2d 32 30 2a 68 20  |h)).FOR b=-20*h |
000000b0  54 4f 20 32 30 2a 68 20  53 54 45 50 20 68 0a 20  |TO 20*h STEP h. |
000000c0  49 3d 52 2a 52 2f 28 61  2a 61 2b 62 2a 62 2d 70  |I=R*R/(a*a+b*b-p|
000000d0  2a 70 29 0a 20 41 3d 49  2a 61 0a 20 42 3d 49 2a  |*p). A=I*a. B=I*|
000000e0  62 0a 20 72 3d 41 42 53  28 49 29 2a 70 0a 20 a0  |b. r=ABS(I)*p. .|
000000f0  40 43 69 72 63 6c 65 28  41 2c 42 2c 72 29 0a 20  |@Circle(A,B,r). |
00000100  4e 45 58 54 0a a0 50 61  74 68 45 6e 64 0a a0 51  |NEXT..PathEnd..Q|
00000110  75 69 74                                          |uit|
00000113