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

StarInfo/tunnel/Tunnelglow

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/Tunnelglow
Read OK:
File size: 0384 bytes
Load address: 0000
Exec address: 0000
File contents
   10REM >Tunnelglow
   20REM example tunnel
   30REM by dL
   40REM (c) AU may 1997
   50:
   60MODE 28:MODE 27:OFF
   70DIM sin(360),cos(360)
   80FOR i=1 TO 15
   90 COLOUR i,i*4,255-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=5
  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
  380 NEXT
  390 deep=(deep-4+space)MOD space
  400 angle=(angle+1+360) MOD 360
  410
  420 scr=3-scr
  430 WAIT
  440 SYS 6,112,scr
  450 SYS 6,113,3-scr
  460 CLS
  470 FOR i=0 TO steps-2
  480  GCOL (steps-2-i)*15/(steps-2)
  490  FOR j=0 TO n
  500   j1=(j+1) MOD n
  510   MOVE x(i,j1),y(i,j1)
  520   DRAW x(i,j),y(i,j)
  530   DRAW x(i+1,j),y(i+1,j)
  540  NEXT
  550 NEXT
  560UNTIL 0

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