Home » Personal collection » Acorn hard disk » misc » misc2 » dcfprogs/Graphics/Spiral

dcfprogs/Graphics/Spiral

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 » Personal collection » Acorn hard disk » misc » misc2
Filename: dcfprogs/Graphics/Spiral
Read OK:
File size: 02B0 bytes
Load address: 0000
Exec address: 0000
Duplicates

There is 1 duplicate copy of this file in the archive:

File contents
   10REM Spiral
   20REM by Stephen Bennett
   30REM (c) Electron User
   40OSCLI"FX178"
   50A%=163:X%=128:Y%=1
   60X%=128
   70Y%=1
   80REM CALL&FFF4
   90DIMsin(360),cos(360)
  100FORA%=0 TO 360 STEP 4
  110sin(A%)=SIN(RAD(A%))
  120cos(A%)=COS(RAD(A%))
  130NEXT
  140MODE2
  150VDU23,1,0;0;0;0;
  160VDU29,640;512;
  170C%=0
  180FORB%=928TO824STEP-8
  190IF C%=0 OR C%=8 C%=C%+1
  200R=B%
  210MOVE640,B%
  220GCOL0,C%
  230C%=C%+1
  240A%=0
  250REPEAT
  260A%=(A%+4) MOD 360
  270R=R-(112/90)
  280DRAW sin(A%)*R,cos(A%)*R
  290UNTILR<2
  300NEXT
  310A%=23
  320?&FE07=?&282
  330D%=-1
  340S%=0
  350REPEAT
  360IF INKEY-98 D%=-1 ELSE IF INKEY-67 D%=1
  370IF INKEY-73 AND S%>0 S%=S%-4 ELSE IF INKEY-105 AND S%<500 S%=S%+4
  380IF A%=16 OR A%=24 A%=A%+D%
  390VDU19,A%,0;0;19,A%-8,1;0;
  400A%=A%+D%
  410IF A%<16 A%=A%+16 ELSE IF A%>31 A%=A%-16
  420FORT%=0TOS%
  430NEXT
  440UNTIL0

� Spiral
� by Stephen Bennett
� (c) Electron User
(�"FX178"
2A%=163:X%=128:Y%=1
<
X%=128
FY%=1
P� CALL&FFF4
Z�sin(360),cos(360)
d�A%=0 � 360 � 4
nsin(A%)=�(�(A%))
xcos(A%)=�(�(A%))
��
��2
��23,1,0;0;0;0;
��29,640;512;
�C%=0
��B%=928�824�-8
�� C%=0 � C%=8 C%=C%+1
�R=B%
��640,B%
�	�0,C%
�C%=C%+1
�A%=0
��
A%=(A%+4) � 360
R=R-(112/90)
� sin(A%)*R,cos(A%)*R
"�R<2
,�
6	A%=23
@?&FE07=?&282
J	D%=-1
TS%=0
^�
h� �-98 D%=-1 � � �-67 D%=1
r4� �-73 � S%>0 S%=S%-4 � � �-105 � S%<500 S%=S%+4
|� A%=16 � A%=24 A%=A%+D%
��19,A%,0;0;19,A%-8,1;0;
�A%=A%+D%
�'� A%<16 A%=A%+16 � � A%>31 A%=A%-16
��T%=0�S%
��
��0
�
00000000  0d 00 0a 0c f4 20 53 70  69 72 61 6c 0d 00 14 18  |..... Spiral....|
00000010  f4 20 62 79 20 53 74 65  70 68 65 6e 20 42 65 6e  |. by Stephen Ben|
00000020  6e 65 74 74 0d 00 1e 17  f4 20 28 63 29 20 45 6c  |nett..... (c) El|
00000030  65 63 74 72 6f 6e 20 55  73 65 72 0d 00 28 0c ff  |ectron User..(..|
00000040  22 46 58 31 37 38 22 0d  00 32 16 41 25 3d 31 36  |"FX178"..2.A%=16|
00000050  33 3a 58 25 3d 31 32 38  3a 59 25 3d 31 0d 00 3c  |3:X%=128:Y%=1..<|
00000060  0a 58 25 3d 31 32 38 0d  00 46 08 59 25 3d 31 0d  |.X%=128..F.Y%=1.|
00000070  00 50 0f f4 20 43 41 4c  4c 26 46 46 46 34 0d 00  |.P.. CALL&FFF4..|
00000080  5a 16 de 73 69 6e 28 33  36 30 29 2c 63 6f 73 28  |Z..sin(360),cos(|
00000090  33 36 30 29 0d 00 64 13  e3 41 25 3d 30 20 b8 20  |360)..d..A%=0 . |
000000a0  33 36 30 20 88 20 34 0d  00 6e 14 73 69 6e 28 41  |360 . 4..n.sin(A|
000000b0  25 29 3d b5 28 b2 28 41  25 29 29 0d 00 78 14 63  |%)=.(.(A%))..x.c|
000000c0  6f 73 28 41 25 29 3d 9b  28 b2 28 41 25 29 29 0d  |os(A%)=.(.(A%)).|
000000d0  00 82 05 ed 0d 00 8c 06  eb 32 0d 00 96 12 ef 32  |.........2.....2|
000000e0  33 2c 31 2c 30 3b 30 3b  30 3b 30 3b 0d 00 a0 10  |3,1,0;0;0;0;....|
000000f0  ef 32 39 2c 36 34 30 3b  35 31 32 3b 0d 00 aa 08  |.29,640;512;....|
00000100  43 25 3d 30 0d 00 b4 12  e3 42 25 3d 39 32 38 b8  |C%=0.....B%=928.|
00000110  38 32 34 88 2d 38 0d 00  be 19 e7 20 43 25 3d 30  |824.-8..... C%=0|
00000120  20 84 20 43 25 3d 38 20  43 25 3d 43 25 2b 31 0d  | . C%=8 C%=C%+1.|
00000130  00 c8 08 52 3d 42 25 0d  00 d2 0b ec 36 34 30 2c  |...R=B%.....640,|
00000140  42 25 0d 00 dc 09 e6 30  2c 43 25 0d 00 e6 0b 43  |B%.....0,C%....C|
00000150  25 3d 43 25 2b 31 0d 00  f0 08 41 25 3d 30 0d 00  |%=C%+1....A%=0..|
00000160  fa 05 f5 0d 01 04 13 41  25 3d 28 41 25 2b 34 29  |.......A%=(A%+4)|
00000170  20 83 20 33 36 30 0d 01  0e 10 52 3d 52 2d 28 31  | . 360....R=R-(1|
00000180  31 32 2f 39 30 29 0d 01  18 19 df 20 73 69 6e 28  |12/90)..... sin(|
00000190  41 25 29 2a 52 2c 63 6f  73 28 41 25 29 2a 52 0d  |A%)*R,cos(A%)*R.|
000001a0  01 22 08 fd 52 3c 32 0d  01 2c 05 ed 0d 01 36 09  |."..R<2..,....6.|
000001b0  41 25 3d 32 33 0d 01 40  10 3f 26 46 45 30 37 3d  |A%=23..@.?&FE07=|
000001c0  3f 26 32 38 32 0d 01 4a  09 44 25 3d 2d 31 0d 01  |?&282..J.D%=-1..|
000001d0  54 08 53 25 3d 30 0d 01  5e 05 f5 0d 01 68 1e e7  |T.S%=0..^....h..|
000001e0  20 a6 2d 39 38 20 44 25  3d 2d 31 20 8b 20 e7 20  | .-98 D%=-1 . . |
000001f0  a6 2d 36 37 20 44 25 3d  31 0d 01 72 34 e7 20 a6  |.-67 D%=1..r4. .|
00000200  2d 37 33 20 80 20 53 25  3e 30 20 53 25 3d 53 25  |-73 . S%>0 S%=S%|
00000210  2d 34 20 8b 20 e7 20 a6  2d 31 30 35 20 80 20 53  |-4 . . .-105 . S|
00000220  25 3c 35 30 30 20 53 25  3d 53 25 2b 34 0d 01 7c  |%<500 S%=S%+4..||
00000230  1c e7 20 41 25 3d 31 36  20 84 20 41 25 3d 32 34  |.. A%=16 . A%=24|
00000240  20 41 25 3d 41 25 2b 44  25 0d 01 86 1b ef 31 39  | A%=A%+D%.....19|
00000250  2c 41 25 2c 30 3b 30 3b  31 39 2c 41 25 2d 38 2c  |,A%,0;0;19,A%-8,|
00000260  31 3b 30 3b 0d 01 90 0c  41 25 3d 41 25 2b 44 25  |1;0;....A%=A%+D%|
00000270  0d 01 9a 27 e7 20 41 25  3c 31 36 20 41 25 3d 41  |...'. A%<16 A%=A|
00000280  25 2b 31 36 20 8b 20 e7  20 41 25 3e 33 31 20 41  |%+16 . . A%>31 A|
00000290  25 3d 41 25 2d 31 36 0d  01 a4 0c e3 54 25 3d 30  |%=A%-16.....T%=0|
000002a0  b8 53 25 0d 01 ae 05 ed  0d 01 b8 06 fd 30 0d ff  |.S%..........0..|
000002b0