Home » Archimedes archive » Acorn User » AU 1997-05 B.adf » Regulars » StarInfo/tunnel/Tunnel12

StarInfo/tunnel/Tunnel12

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/Tunnel12
Read OK:
File size: 038D bytes
Load address: 0000
Exec address: 0000
File contents
   10REM >Tunnel12
   20REM example tunnel
   30REM by dL
   40REM (c) AU may 1997
   50
   60MODE 128+12: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=12
  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-4+space)MOD space
  410 angle=(angle+2+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
� >Tunnel12
� example tunnel
� by dL
(� (c) AU may 1997
2
<� 128+12:�
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=12
�
�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-4+space)� space
� angle=(angle+2+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 0f f4 20 3e 54  75 6e 6e 65 6c 31 32 0d  |..... >Tunnel12.|
00000010  00 14 14 f4 20 65 78 61  6d 70 6c 65 20 74 75 6e  |.... example tun|
00000020  6e 65 6c 0d 00 1e 0b f4  20 62 79 20 64 4c 0d 00  |nel..... by dL..|
00000030  28 15 f4 20 28 63 29 20  41 55 20 6d 61 79 20 31  |(.. (c) AU may 1|
00000040  39 39 37 0d 00 32 04 0d  00 3c 0e eb 20 31 32 38  |997..2...<.. 128|
00000050  2b 31 32 3a 87 0d 00 46  17 de 20 73 69 6e 28 33  |+12:...F.. sin(3|
00000060  36 30 29 2c 63 6f 73 28  33 36 30 29 0d 00 50 0e  |60),cos(360)..P.|
00000070  e3 20 69 3d 30 20 b8 20  31 35 0d 00 5a 17 20 fb  |. i=0 . 15..Z. .|
00000080  20 69 2c 69 2a 31 37 2c  69 2a 31 37 2c 69 2a 31  | i,i*17,i*17,i*1|
00000090  37 0d 00 64 05 ed 0d 00  6e 0f e3 20 69 3d 30 20  |7..d....n.. i=0 |
000000a0  b8 20 33 36 30 0d 00 78  11 20 73 69 6e 28 69 29  |. 360..x. sin(i)|
000000b0  3d b5 b2 28 69 29 0d 00  82 11 20 63 6f 73 28 69  |=..(i).... cos(i|
000000c0  29 3d 9b b2 28 69 29 0d  00 8c 05 ed 0d 00 96 0f  |)=..(i).........|
000000d0  64 65 65 70 65 73 74 3d  35 31 32 0d 00 a0 0d 73  |deepest=512....s|
000000e0  70 61 63 65 20 3d 33 32  0d 00 aa 08 6e 3d 31 32  |pace =32....n=12|
000000f0  0d 00 b4 04 0d 00 be 1b  73 74 65 70 73 20 3d 20  |........steps = |
00000100  64 65 65 70 65 73 74 20  81 20 73 70 61 63 65 0d  |deepest . space.|
00000110  00 c8 11 64 65 67 72 65  65 73 3d 33 36 30 2f 6e  |...degrees=360/n|
00000120  0d 00 d2 1e de 20 78 28  73 74 65 70 73 2c 20 6e  |..... x(steps, n|
00000130  29 2c 20 79 28 73 74 65  70 73 2c 20 6e 29 0d 00  |), y(steps, n)..|
00000140  dc 0b 61 6e 67 6c 65 3d  30 0d 00 e6 09 73 63 72  |..angle=0....scr|
00000150  3d 31 0d 00 f0 0a 64 65  65 70 3d 30 0d 00 fa 05  |=1....deep=0....|
00000160  f5 0d 01 04 04 0d 01 0e  0e 20 61 6e 67 3d 61 6e  |......... ang=an|
00000170  67 6c 65 0d 01 18 08 20  69 3d 30 0d 01 22 20 20  |gle.... i=0.."  |
00000180  e3 20 64 65 70 74 68 3d  30 20 b8 20 64 65 65 70  |. depth=0 . deep|
00000190  65 73 74 20 88 20 73 70  61 63 65 0d 01 2c 09 20  |est . space..,. |
000001a0  20 6a 3d 30 0d 01 36 22  20 20 20 e3 20 61 3d 61  | j=0..6"   . a=a|
000001b0  6e 67 20 b8 20 33 36 30  2b 61 6e 67 20 88 20 64  |ng . 360+ang . d|
000001c0  65 67 72 65 65 73 0d 01  40 22 20 20 20 64 20 3d  |egrees..@"   d =|
000001d0  20 33 30 30 30 30 20 81  20 28 64 65 65 70 2b 64  | 30000 . (deep+d|
000001e0  65 70 74 68 2b 31 30 29  0d 01 4a 20 20 20 20 78  |epth+10)..J    x|
000001f0  28 69 2c 6a 29 3d 36 34  30 2b 64 2a 73 69 6e 28  |(i,j)=640+d*sin(|
00000200  61 20 83 20 33 36 30 29  0d 01 54 20 20 20 20 79  |a . 360)..T    y|
00000210  28 69 2c 6a 29 3d 34 38  30 2b 64 2a 63 6f 73 28  |(i,j)=480+d*cos(|
00000220  61 20 83 20 33 36 30 29  0d 01 5e 0b 20 20 20 6a  |a . 360)..^.   j|
00000230  2b 3d 31 0d 01 68 07 20  20 ed 0d 01 72 0a 20 20  |+=1..h.  ...r.  |
00000240  69 2b 3d 31 0d 01 7c 0d  f4 20 20 61 6e 67 2b 3d  |i+=1..|..  ang+=|
00000250  35 0d 01 86 06 20 ed 0d  01 90 1f 20 64 65 65 70  |5.... ..... deep|
00000260  3d 28 64 65 65 70 2d 34  2b 73 70 61 63 65 29 83  |=(deep-4+space).|
00000270  20 73 70 61 63 65 0d 01  9a 1e 20 61 6e 67 6c 65  | space.... angle|
00000280  3d 28 61 6e 67 6c 65 2b  32 2b 33 36 30 29 20 83  |=(angle+2+360) .|
00000290  20 33 36 30 0d 01 a4 04  0d 01 ae 0e 20 73 63 72  | 360........ scr|
000002a0  3d 33 2d 73 63 72 0d 01  b8 07 20 c8 96 0d 01 c2  |=3-scr.... .....|
000002b0  11 20 c8 99 20 36 2c 31  31 32 2c 73 63 72 0d 01  |. .. 6,112,scr..|
000002c0  cc 13 20 c8 99 20 36 2c  31 31 33 2c 33 2d 73 63  |.. .. 6,113,3-sc|
000002d0  72 0d 01 d6 06 20 db 0d  01 e0 14 20 e3 20 69 3d  |r.... ..... . i=|
000002e0  30 20 b8 20 73 74 65 70  73 2d 32 0d 01 ea 20 20  |0 . steps-2...  |
000002f0  20 e6 20 28 73 74 65 70  73 2d 32 2d 69 29 2a 31  | . (steps-2-i)*1|
00000300  35 2f 28 73 74 65 70 73  2d 32 29 0d 01 f4 0f 20  |5/(steps-2).... |
00000310  20 e3 20 6a 3d 30 20 b8  20 6e 0d 01 fe 13 20 20  | . j=0 . n....  |
00000320  20 6a 31 3d 28 6a 2b 31  29 20 83 20 6e 0d 02 08  | j1=(j+1) . n...|
00000330  18 20 20 20 ec 20 78 28  69 2c 6a 31 29 2c 79 28  |.   . x(i,j1),y(|
00000340  69 2c 6a 31 29 0d 02 12  16 20 20 20 df 20 78 28  |i,j1)....   . x(|
00000350  69 2c 6a 29 2c 79 28 69  2c 6a 29 0d 02 1c 1c 20  |i,j),y(i,j).... |
00000360  20 20 df 20 78 28 69 2b  31 2c 6a 31 29 2c 79 28  |  . x(i+1,j1),y(|
00000370  69 2b 31 2c 6a 31 29 0d  02 26 07 20 20 ed 0d 02  |i+1,j1)..&.  ...|
00000380  30 06 20 ed 0d 02 3a 07  fd 20 30 0d ff           |0. ...:.. 0..|
0000038d