Home » Archimedes archive » Archimedes World » AW-1995-02-Disc1.adf » Disk1Feb95 » !AWFeb95/Goodies/DrawBasic/!DrawBasic/Library/Examples/Chapter/Exer_3/Ex_3/1MagicRose
!AWFeb95/Goodies/DrawBasic/!DrawBasic/Library/Examples/Chapter/Exer_3/Ex_3/1MagicRose
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/!DrawBasic/Library/Examples/Chapter/Exer_3/Ex_3/1MagicRose |
Read OK: | ✔ |
File size: | 016D 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/1MagicRose
- Archimedes archive » Archimedes World » AW-1995-01-Disc1.adf » Disk1Jan95 » !AWJan95/Goodies/DrawBasic/!DrawBasic/Library/Examples/Chapter/Exer_3/Ex_3/1MagicRose
- Archimedes archive » Archimedes World » AW-1995-05-Disc1.adf » AWMay95_1 » InTheMag/DrawBasic/!DrawBasic/Library/Examples/Chapter/Exer_3/Ex_3/1MagicRose
- Archimedes archive » Archimedes World » AW-1995-02-Disc1.adf » Disk1Feb95 » !AWFeb95/Goodies/DrawBasic/!DrawBasic/Library/Examples/Chapter/Exer_3/Ex_3/1MagicRose
File contents
REM > Magic Rose based on circle centre (a,b) with n points a=5 : b=5 : radius=5 �Origin(a,b) INPUT "# of points";n angle=2*PI/n �PathBegin(curve) FOR i=1 TO n theta_i=i*angle FOR j=i TO n theta_j=j*angle �MovePolar(radius,theta_i) : �DrawPolar(radius,theta_j) NEXT NEXT �PathEnd �Quit
00000000 0a 52 45 4d 20 3e 20 4d 61 67 69 63 20 52 6f 73 |.REM > Magic Ros| 00000010 65 20 62 61 73 65 64 20 6f 6e 20 63 69 72 63 6c |e based on circl| 00000020 65 20 63 65 6e 74 72 65 20 28 61 2c 62 29 20 77 |e centre (a,b) w| 00000030 69 74 68 20 6e 20 70 6f 69 6e 74 73 0a 20 20 20 |ith n points. | 00000040 20 20 20 61 3d 35 20 3a 20 62 3d 35 20 3a 20 72 | a=5 : b=5 : r| 00000050 61 64 69 75 73 3d 35 0a 0a 20 20 20 20 20 20 a0 |adius=5.. .| 00000060 4f 72 69 67 69 6e 28 61 2c 62 29 0a 20 20 20 20 |Origin(a,b). | 00000070 20 20 0a 20 20 20 20 20 20 49 4e 50 55 54 20 22 | . INPUT "| 00000080 23 20 6f 66 20 70 6f 69 6e 74 73 22 3b 6e 0a 20 |# of points";n. | 00000090 20 20 20 20 20 61 6e 67 6c 65 3d 32 2a 50 49 2f | angle=2*PI/| 000000a0 6e 0a 20 20 20 20 20 20 0a 0a 20 a0 50 61 74 68 |n. .. .Path| 000000b0 42 65 67 69 6e 28 63 75 72 76 65 29 20 20 0a 20 |Begin(curve) . | 000000c0 20 46 4f 52 20 69 3d 31 20 54 4f 20 6e 0a 20 20 | FOR i=1 TO n. | 000000d0 20 74 68 65 74 61 5f 69 3d 69 2a 61 6e 67 6c 65 | theta_i=i*angle| 000000e0 20 20 20 0a 20 20 20 46 4f 52 20 6a 3d 69 20 54 | . FOR j=i T| 000000f0 4f 20 6e 0a 20 20 20 20 74 68 65 74 61 5f 6a 3d |O n. theta_j=| 00000100 6a 2a 61 6e 67 6c 65 0a 20 20 20 20 a0 4d 6f 76 |j*angle. .Mov| 00000110 65 50 6f 6c 61 72 28 72 61 64 69 75 73 2c 74 68 |ePolar(radius,th| 00000120 65 74 61 5f 69 29 20 3a 20 a0 44 72 61 77 50 6f |eta_i) : .DrawPo| 00000130 6c 61 72 28 72 61 64 69 75 73 2c 74 68 65 74 61 |lar(radius,theta| 00000140 5f 6a 29 0a 20 20 20 20 4e 45 58 54 0a 20 20 20 |_j). NEXT. | 00000150 4e 45 58 54 20 20 20 0a 20 20 a0 50 61 74 68 45 |NEXT . .PathE| 00000160 6e 64 0a 20 20 0a 20 20 a0 51 75 69 74 |nd. . .Quit| 0000016d