Home » Archimedes archive » Archimedes World » AW-1995-01-Disc1.adf » Disk1Jan95 » !AWJan95/Goodies/DrawBasic/!DrawBasic/Library/Examples/Chapter/Ex_5_10

!AWJan95/Goodies/DrawBasic/!DrawBasic/Library/Examples/Chapter/Ex_5_10

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-01-Disc1.adf » Disk1Jan95
Filename: !AWJan95/Goodies/DrawBasic/!DrawBasic/Library/Examples/Chapter/Ex_5_10
Read OK:
File size: 014E bytes
Load address: 0000
Exec address: 0000
File contents
�Fill(�Black)
�WindingRule(0)
�InvertedChessBoard
�Quit

DEF �InvertedChessBoard
LOCAL path,n,x,y,R
n=4 : R=2 : �Origin(4,4)
�PathBegin(path)
 FOR x=-n TO n
 IF x<>0 THEN
  alpha=R*R/2/x
  �@Circle(alpha,0,ABSalpha)
 ENDIF
 NEXT
 FOR y=-n TO n
  IF y<>0 THEN
  alpha=R*R/2/y
  �@Circle(0,alpha,ABSalpha)
  ENDIF
 NEXT
�PathEnd
ENDPROC
00000000  a0 46 69 6c 6c 28 bb 42  6c 61 63 6b 29 0a a0 57  |.Fill(.Black)..W|
00000010  69 6e 64 69 6e 67 52 75  6c 65 28 30 29 0a a0 49  |indingRule(0)..I|
00000020  6e 76 65 72 74 65 64 43  68 65 73 73 42 6f 61 72  |nvertedChessBoar|
00000030  64 0a a0 51 75 69 74 0a  0a 44 45 46 20 a0 49 6e  |d..Quit..DEF .In|
00000040  76 65 72 74 65 64 43 68  65 73 73 42 6f 61 72 64  |vertedChessBoard|
00000050  0a 4c 4f 43 41 4c 20 70  61 74 68 2c 6e 2c 78 2c  |.LOCAL path,n,x,|
00000060  79 2c 52 0a 6e 3d 34 20  3a 20 52 3d 32 20 3a 20  |y,R.n=4 : R=2 : |
00000070  a0 4f 72 69 67 69 6e 28  34 2c 34 29 0a a0 50 61  |.Origin(4,4)..Pa|
00000080  74 68 42 65 67 69 6e 28  70 61 74 68 29 0a 20 46  |thBegin(path). F|
00000090  4f 52 20 78 3d 2d 6e 20  54 4f 20 6e 0a 20 49 46  |OR x=-n TO n. IF|
000000a0  20 78 3c 3e 30 20 54 48  45 4e 0a 20 20 61 6c 70  | x<>0 THEN.  alp|
000000b0  68 61 3d 52 2a 52 2f 32  2f 78 0a 20 20 a0 40 43  |ha=R*R/2/x.  .@C|
000000c0  69 72 63 6c 65 28 61 6c  70 68 61 2c 30 2c 41 42  |ircle(alpha,0,AB|
000000d0  53 61 6c 70 68 61 29 0a  20 45 4e 44 49 46 0a 20  |Salpha). ENDIF. |
000000e0  4e 45 58 54 0a 20 46 4f  52 20 79 3d 2d 6e 20 54  |NEXT. FOR y=-n T|
000000f0  4f 20 6e 0a 20 20 49 46  20 79 3c 3e 30 20 54 48  |O n.  IF y<>0 TH|
00000100  45 4e 0a 20 20 61 6c 70  68 61 3d 52 2a 52 2f 32  |EN.  alpha=R*R/2|
00000110  2f 79 0a 20 20 a0 40 43  69 72 63 6c 65 28 30 2c  |/y.  .@Circle(0,|
00000120  61 6c 70 68 61 2c 41 42  53 61 6c 70 68 61 29 0a  |alpha,ABSalpha).|
00000130  20 20 45 4e 44 49 46 0a  20 4e 45 58 54 0a a0 50  |  ENDIF. NEXT..P|
00000140  61 74 68 45 6e 64 0a 45  4e 44 50 52 4f 43        |athEnd.ENDPROC|
0000014e