Home » Archimedes archive » Archimedes World » AW-1995-01-Disc1.adf » Disk1Jan95 » !AWJan95/Goodies/DrawBasic/!DrawBasic/Library/Examples/Chapter/Exer_3/Ex_3
!AWJan95/Goodies/DrawBasic/!DrawBasic/Library/Examples/Chapter/Exer_3/Ex_3
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/Exer_3/Ex_3 |
Read OK: | ✔ |
File size: | 011F bytes |
Load address: | 0000 |
Exec address: | 0000 |
Duplicates
There are 3 duplicate copies of this file in the archive:
- Archimedes archive » Archimedes World » AW-1994-12-Disc1.adf » Disk1Dec94 » !AWDec94/Goodies/DrawBasic/!DrawBasic/Library/Examples/Chapter/Exer_3/Ex_3
- Archimedes archive » Archimedes World » AW-1995-01-Disc1.adf » Disk1Jan95 » !AWJan95/Goodies/DrawBasic/!DrawBasic/Library/Examples/Chapter/Exer_3/Ex_3
- Archimedes archive » Archimedes World » AW-1995-05-Disc1.adf » AWMay95_1 » InTheMag/DrawBasic/!DrawBasic/Library/Examples/Chapter/Exer_3/Ex_3
- Archimedes archive » Archimedes World » AW-1995-02-Disc1.adf » Disk1Feb95 » !AWFeb95/Goodies/DrawBasic/!DrawBasic/Library/Examples/Chapter/Exer_3/Ex_3
File contents
REM > Draws an Archimedes' spiral h=PI/100 : K=.05 : NumberOfTurns=8 �Origin(3,3) �PathBegin(spiral) FOR theta=0 TO NumberOfTurns*(2*PI) STEP h r=K*theta x=r*COS(theta) : y=r*SIN(theta) IF theta=0 THEN �Move(x,y) ELSE �Draw(x,y) NEXT �PathEnd �Quit
00000000 0a 52 45 4d 20 3e 20 44 72 61 77 73 20 61 6e 20 |.REM > Draws an | 00000010 41 72 63 68 69 6d 65 64 65 73 27 20 73 70 69 72 |Archimedes' spir| 00000020 61 6c 0a 0a 68 3d 50 49 2f 31 30 30 20 20 3a 20 |al..h=PI/100 : | 00000030 4b 3d 2e 30 35 20 20 3a 20 4e 75 6d 62 65 72 4f |K=.05 : NumberO| 00000040 66 54 75 72 6e 73 3d 38 0a 0a 0a 20 0a 20 20 a0 |fTurns=8... . .| 00000050 4f 72 69 67 69 6e 28 33 2c 33 29 0a 20 20 a0 50 |Origin(3,3). .P| 00000060 61 74 68 42 65 67 69 6e 28 73 70 69 72 61 6c 29 |athBegin(spiral)| 00000070 0a 20 20 20 20 46 4f 52 20 74 68 65 74 61 3d 30 |. FOR theta=0| 00000080 20 54 4f 20 4e 75 6d 62 65 72 4f 66 54 75 72 6e | TO NumberOfTurn| 00000090 73 2a 28 32 2a 50 49 29 20 53 54 45 50 20 68 0a |s*(2*PI) STEP h.| 000000a0 20 20 20 20 20 72 3d 4b 2a 74 68 65 74 61 0a 20 | r=K*theta. | 000000b0 20 20 20 20 78 3d 72 2a 43 4f 53 28 74 68 65 74 | x=r*COS(thet| 000000c0 61 29 20 3a 20 79 3d 72 2a 53 49 4e 28 74 68 65 |a) : y=r*SIN(the| 000000d0 74 61 29 0a 20 20 20 20 20 49 46 20 74 68 65 74 |ta). IF thet| 000000e0 61 3d 30 20 54 48 45 4e 20 a0 4d 6f 76 65 28 78 |a=0 THEN .Move(x| 000000f0 2c 79 29 20 45 4c 53 45 20 a0 44 72 61 77 28 78 |,y) ELSE .Draw(x| 00000100 2c 79 29 0a 20 20 20 20 20 4e 45 58 54 0a 20 20 |,y). NEXT. | 00000110 20 a0 50 61 74 68 45 6e 64 0a a0 51 75 69 74 | .PathEnd..Quit| 0000011f