Home » Archimedes archive » Archimedes World » AW-1995-02-Disc1.adf » Disk1Feb95 » !AWFeb95/Goodies/DrawBasic/Style/WindRule/Recursion2

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