Home » Archimedes archive » Acorn User » AU 1997-05 B.adf » Regulars » StarInfo/tunnel/Tunnel
StarInfo/tunnel/Tunnel
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 » Acorn User » AU 1997-05 B.adf » Regulars |
Filename: | StarInfo/tunnel/Tunnel |
Read OK: | ✔ |
File size: | 038C bytes |
Load address: | 0000 |
Exec address: | 0000 |
File contents
10REM >Tunnel 20REM example tunnel 30REM by dL 40REM (c) AU may 1997 50 60MODE 28:MODE 27:OFF 70DIM sin(360),cos(360) 80FOR i=0 TO 15 90 COLOUR i,i*17,i*17,i*17 100NEXT 110FOR i=0 TO 360 120 sin(i)=SINRAD(i) 130 cos(i)=COSRAD(i) 140NEXT 150deepest=512 160space =32 170n=24 180 190steps = deepest DIV space 200degrees=360/n 210DIM x(steps, n), y(steps, n) 220angle=0 230scr=1 240deep=0 250REPEAT 260 270 ang=angle 280 i=0 290 FOR depth=0 TO deepest STEP space 300 j=0 310 FOR a=ang TO 360+ang STEP degrees 320 d = 30000 DIV (deep+depth+10) 330 x(i,j)=640+d*sin(a MOD 360) 340 y(i,j)=480+d*cos(a MOD 360) 350 j+=1 360 NEXT 370 i+=1 380REM ang+=5 390 NEXT 400 deep=(deep-2+space)MOD space 410 angle=(angle+1+360) MOD 360 420 430 scr=3-scr 440 WAIT 450 SYS 6,112,scr 460 SYS 6,113,3-scr 470 CLS 480 FOR i=0 TO steps-2 490 GCOL (steps-2-i)*15/(steps-2) 500 FOR j=0 TO n 510 j1=(j+1) MOD n 520 MOVE x(i,j1),y(i,j1) 530 DRAW x(i,j),y(i,j) 540 DRAW x(i+1,j1),y(i+1,j1) 550 NEXT 560 NEXT 570UNTIL 0
� >Tunnel � example tunnel � by dL (� (c) AU may 1997 2 <� 28:� 27:� F� sin(360),cos(360) P� i=0 � 15 Z � i,i*17,i*17,i*17 d� n� i=0 � 360 x sin(i)=��(i) � cos(i)=��(i) �� �deepest=512 � space =32 �n=24 � �steps = deepest � space �degrees=360/n �� x(steps, n), y(steps, n) �angle=0 � scr=1 � deep=0 �� ang=angle i=0 " � depth=0 � deepest � space , j=0 6" � a=ang � 360+ang � degrees @" d = 30000 � (deep+depth+10) J x(i,j)=640+d*sin(a � 360) T y(i,j)=480+d*cos(a � 360) ^ j+=1 h � r i+=1 | � ang+=5 � � � deep=(deep-2+space)� space � angle=(angle+1+360) � 360 � � scr=3-scr � Ȗ � ș 6,112,scr � ș 6,113,3-scr � � � � i=0 � steps-2 � � (steps-2-i)*15/(steps-2) � � j=0 � n � j1=(j+1) � n � x(i,j1),y(i,j1) � x(i,j),y(i,j) � x(i+1,j1),y(i+1,j1) & � 0 � :� 0 �
00000000 0d 00 0a 0d f4 20 3e 54 75 6e 6e 65 6c 0d 00 14 |..... >Tunnel...| 00000010 14 f4 20 65 78 61 6d 70 6c 65 20 74 75 6e 6e 65 |.. example tunne| 00000020 6c 0d 00 1e 0b f4 20 62 79 20 64 4c 0d 00 28 15 |l..... by dL..(.| 00000030 f4 20 28 63 29 20 41 55 20 6d 61 79 20 31 39 39 |. (c) AU may 199| 00000040 37 0d 00 32 04 0d 00 3c 0f eb 20 32 38 3a eb 20 |7..2...<.. 28:. | 00000050 32 37 3a 87 0d 00 46 17 de 20 73 69 6e 28 33 36 |27:...F.. sin(36| 00000060 30 29 2c 63 6f 73 28 33 36 30 29 0d 00 50 0e e3 |0),cos(360)..P..| 00000070 20 69 3d 30 20 b8 20 31 35 0d 00 5a 17 20 fb 20 | i=0 . 15..Z. . | 00000080 69 2c 69 2a 31 37 2c 69 2a 31 37 2c 69 2a 31 37 |i,i*17,i*17,i*17| 00000090 0d 00 64 05 ed 0d 00 6e 0f e3 20 69 3d 30 20 b8 |..d....n.. i=0 .| 000000a0 20 33 36 30 0d 00 78 11 20 73 69 6e 28 69 29 3d | 360..x. sin(i)=| 000000b0 b5 b2 28 69 29 0d 00 82 11 20 63 6f 73 28 69 29 |..(i).... cos(i)| 000000c0 3d 9b b2 28 69 29 0d 00 8c 05 ed 0d 00 96 0f 64 |=..(i).........d| 000000d0 65 65 70 65 73 74 3d 35 31 32 0d 00 a0 0d 73 70 |eepest=512....sp| 000000e0 61 63 65 20 3d 33 32 0d 00 aa 08 6e 3d 32 34 0d |ace =32....n=24.| 000000f0 00 b4 04 0d 00 be 1b 73 74 65 70 73 20 3d 20 64 |.......steps = d| 00000100 65 65 70 65 73 74 20 81 20 73 70 61 63 65 0d 00 |eepest . space..| 00000110 c8 11 64 65 67 72 65 65 73 3d 33 36 30 2f 6e 0d |..degrees=360/n.| 00000120 00 d2 1e de 20 78 28 73 74 65 70 73 2c 20 6e 29 |.... x(steps, n)| 00000130 2c 20 79 28 73 74 65 70 73 2c 20 6e 29 0d 00 dc |, y(steps, n)...| 00000140 0b 61 6e 67 6c 65 3d 30 0d 00 e6 09 73 63 72 3d |.angle=0....scr=| 00000150 31 0d 00 f0 0a 64 65 65 70 3d 30 0d 00 fa 05 f5 |1....deep=0.....| 00000160 0d 01 04 04 0d 01 0e 0e 20 61 6e 67 3d 61 6e 67 |........ ang=ang| 00000170 6c 65 0d 01 18 08 20 69 3d 30 0d 01 22 20 20 e3 |le.... i=0.." .| 00000180 20 64 65 70 74 68 3d 30 20 b8 20 64 65 65 70 65 | depth=0 . deepe| 00000190 73 74 20 88 20 73 70 61 63 65 0d 01 2c 09 20 20 |st . space..,. | 000001a0 6a 3d 30 0d 01 36 22 20 20 20 e3 20 61 3d 61 6e |j=0..6" . a=an| 000001b0 67 20 b8 20 33 36 30 2b 61 6e 67 20 88 20 64 65 |g . 360+ang . de| 000001c0 67 72 65 65 73 0d 01 40 22 20 20 20 64 20 3d 20 |grees..@" d = | 000001d0 33 30 30 30 30 20 81 20 28 64 65 65 70 2b 64 65 |30000 . (deep+de| 000001e0 70 74 68 2b 31 30 29 0d 01 4a 20 20 20 20 78 28 |pth+10)..J x(| 000001f0 69 2c 6a 29 3d 36 34 30 2b 64 2a 73 69 6e 28 61 |i,j)=640+d*sin(a| 00000200 20 83 20 33 36 30 29 0d 01 54 20 20 20 20 79 28 | . 360)..T y(| 00000210 69 2c 6a 29 3d 34 38 30 2b 64 2a 63 6f 73 28 61 |i,j)=480+d*cos(a| 00000220 20 83 20 33 36 30 29 0d 01 5e 0b 20 20 20 6a 2b | . 360)..^. j+| 00000230 3d 31 0d 01 68 07 20 20 ed 0d 01 72 0a 20 20 69 |=1..h. ...r. i| 00000240 2b 3d 31 0d 01 7c 0d f4 20 20 61 6e 67 2b 3d 35 |+=1..|.. ang+=5| 00000250 0d 01 86 06 20 ed 0d 01 90 1f 20 64 65 65 70 3d |.... ..... deep=| 00000260 28 64 65 65 70 2d 32 2b 73 70 61 63 65 29 83 20 |(deep-2+space). | 00000270 73 70 61 63 65 0d 01 9a 1e 20 61 6e 67 6c 65 3d |space.... angle=| 00000280 28 61 6e 67 6c 65 2b 31 2b 33 36 30 29 20 83 20 |(angle+1+360) . | 00000290 33 36 30 0d 01 a4 04 0d 01 ae 0e 20 73 63 72 3d |360........ scr=| 000002a0 33 2d 73 63 72 0d 01 b8 07 20 c8 96 0d 01 c2 11 |3-scr.... ......| 000002b0 20 c8 99 20 36 2c 31 31 32 2c 73 63 72 0d 01 cc | .. 6,112,scr...| 000002c0 13 20 c8 99 20 36 2c 31 31 33 2c 33 2d 73 63 72 |. .. 6,113,3-scr| 000002d0 0d 01 d6 06 20 db 0d 01 e0 14 20 e3 20 69 3d 30 |.... ..... . i=0| 000002e0 20 b8 20 73 74 65 70 73 2d 32 0d 01 ea 20 20 20 | . steps-2... | 000002f0 e6 20 28 73 74 65 70 73 2d 32 2d 69 29 2a 31 35 |. (steps-2-i)*15| 00000300 2f 28 73 74 65 70 73 2d 32 29 0d 01 f4 0f 20 20 |/(steps-2).... | 00000310 e3 20 6a 3d 30 20 b8 20 6e 0d 01 fe 13 20 20 20 |. j=0 . n.... | 00000320 6a 31 3d 28 6a 2b 31 29 20 83 20 6e 0d 02 08 18 |j1=(j+1) . n....| 00000330 20 20 20 ec 20 78 28 69 2c 6a 31 29 2c 79 28 69 | . x(i,j1),y(i| 00000340 2c 6a 31 29 0d 02 12 16 20 20 20 df 20 78 28 69 |,j1).... . x(i| 00000350 2c 6a 29 2c 79 28 69 2c 6a 29 0d 02 1c 1c 20 20 |,j),y(i,j).... | 00000360 20 df 20 78 28 69 2b 31 2c 6a 31 29 2c 79 28 69 | . x(i+1,j1),y(i| 00000370 2b 31 2c 6a 31 29 0d 02 26 07 20 20 ed 0d 02 30 |+1,j1)..&. ...0| 00000380 06 20 ed 0d 02 3a 07 fd 20 30 0d ff |. ...:.. 0..| 0000038c