Home » Personal collection » Acorn tapes » Electron_User » Electron_User_tape06a_acorn_eu_1989_december.wav » NEWTON

NEWTON

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 tapes » Electron_User » Electron_User_tape06a_acorn_eu_1989_december.wav
Filename: NEWTON
Read OK:
File size: 05C6 bytes
Load address: 2000
Exec address: 1900
Duplicates

There are 4 duplicate copies of this file in the archive:

File contents
   10REM Newton's Cradle
   20REM By Scott Moore
   30REM (c) Electron User
   40MODE 2
   50VDU 29,50;0;
   60DIM OF%(4),F%(4),K%(7,4),S%(36),C%(36)
   70VDU 23;8202;0;0;0;
   80FOR A%=0TO36
   90S%(A%)=SIN(RAD(A%*10))*40
  100C%(A%)=COS(RAD(A%*10))*40
  110NEXT
  120FOR A%=1 TO 10
  130READ Q%,W%,E%,R%
  140PROCCIRC(Q%,W%,E%,R%)
  150NEXT
  160GCOL 0,14
  170MOVE -50,320
  180DRAW -50,600
  190DRAW 200,600
  200DRAW 400,700
  210DRAW 800,700
  220DRAW 600,600
  230DRAW 850,600
  240DRAW 850,320
  250MOVE 800,700
  260DRAW 1050,700
  270DRAW 1050,420
  280MOVE 400,700
  290DRAW 150,700
  300DRAW 150,420
  310MOVE 200,600
  320DRAW 600,600
  330FOR A%=1 TO 4
  340READ Q%,W%,E%,R%
  350PROCCIRC(Q%,W%,E%,R%)
  360NEXT
  370COLOUR 14
  380FOR A%=1 TO 7
  390READ K%(A%,1),K%(A%,2),K%(A%,3),K%(A%,4)
  400NEXT
  410PRINT TAB(3,2)"Newton's cradle" ' ' "   By Scott Moore"
  420FOR A%=1 TO 15
  430VDU 19,A%,0;0;
  440NEXT
  450VDU 19,14,1;0;19,12,3;0;19,4,3;0;
  460P%=1:D%=1:L%=2
  470FOR X%=1 TO 4
  480OF%(X%)=F%(X%)
  490F%(X%)=K%(L%,X%)
  500NEXT
  510FOR X%=1 TO 4
  520VDU 19,OF%(X%),0;0;19,F%(X%),3;0;
  530NEXT
  540IF L%=7 OR L%=1 D%=-D% ELSE IF L%=4 OSCLI("MOTOR"+STR$(P%)):P%=P% EOR 1
  550L%=L%+D%
  560GOTO 470
  570DATA 752,625,1,13,720,580,1,2,680,544,1,9,600,500,1,1,558,479,0,0,550,475,0,4,508,454,0,0,500,450,0,4,458,429,0,0,400,400,1,8,450,425,0,4,312,380,1,5,160,400,0,6,226,376,1,3
  580DEF PROCCIRC(X%,Y%,G%,C%)
  590GCOLG%,C%
  600MOVE X%,Y%+40
  610FOR Z%=1 TO 36
  620MOVE X%,Y%
  630PLOT 85,X%+S%(Z%),Y%+C%(Z%)
  640NEXT
  650GCOL 0,C%
  660IF C%=4 THEN 680 ELSE IF C%=0 ENDPROC
  670IF Y%>400:MOVE 400,700:DRAW X%,Y%+40:DRAW 800,700:ENDPROC ELSE MOVE 200,600:DRAW X%,Y%+40:DRAW 600,600:ENDPROC
  680MOVE X%-200,Y%+200
  690DRAW X%,Y%+40
  700DRAW X%+200,Y%+200
  710ENDPROC
  720DATA 8,15,13,13,8,15,2,11,8,11,9,11,8,1,1,1,1,5,1,1,1,7,3,3,1,7,6,6

� Newton's Cradle
� By Scott Moore
� (c) Electron User
(� 2
2� 29,50;0;
<(� OF%(4),F%(4),K%(7,4),S%(36),C%(36)
F� 23;8202;0;0;0;
P
� A%=0�36
ZS%(A%)=�(�(A%*10))*40
dC%(A%)=�(�(A%*10))*40
n�
x� A%=1 � 10
�� Q%,W%,E%,R%
��CIRC(Q%,W%,E%,R%)
��
�
� 0,14
�
� -50,320
�
� -50,600
�
� 200,600
�
� 400,700
�
� 800,700
�
� 600,600
�
� 850,600
�
� 850,320
�
� 800,700
� 1050,700
� 1050,420

� 400,700
"
� 150,700
,
� 150,420
6
� 200,600
@
� 600,600
J� A%=1 � 4
T� Q%,W%,E%,R%
^�CIRC(Q%,W%,E%,R%)
h�
r� 14
|� A%=1 � 7
�)� K%(A%,1),K%(A%,2),K%(A%,3),K%(A%,4)
��
�4� �3,2)"Newton's cradle" ' ' "   By Scott Moore"
�� A%=1 � 15
�� 19,A%,0;0;
��
�#� 19,14,1;0;19,12,3;0;19,4,3;0;
�P%=1:D%=1:L%=2
�� X%=1 � 4
�OF%(X%)=F%(X%)
�F%(X%)=K%(L%,X%)
��
�� X%=1 � 4
#� 19,OF%(X%),0;0;19,F%(X%),3;0;
�
<� L%=7 � L%=1 D%=-D% � � L%=4 �("MOTOR"+�(P%)):P%=P% � 1
&L%=L%+D%
0
� �dVA
:�� 752,625,1,13,720,580,1,2,680,544,1,9,600,500,1,1,558,479,0,0,550,475,0,4,508,454,0,0,500,450,0,4,458,429,0,0,400,400,1,8,450,425,0,4,312,380,1,5,160,400,0,6,226,376,1,3
D� �CIRC(X%,Y%,G%,C%)
N
�G%,C%
X� X%,Y%+40
b� Z%=1 � 36
l� X%,Y%
v� 85,X%+S%(Z%),Y%+C%(Z%)
��
�
� 0,C%
�� C%=4 � �thB � � C%=0 �
�P� Y%>400:� 400,700:� X%,Y%+40:� 800,700:� � � 200,600:� X%,Y%+40:� 600,600:�
�� X%-200,Y%+200
�� X%,Y%+40
�� X%+200,Y%+200
��
�D� 8,15,13,13,8,15,2,11,8,11,9,11,8,1,1,1,1,5,1,1,1,7,3,3,1,7,6,6
�
00000000  0d 00 0a 15 f4 20 4e 65  77 74 6f 6e 27 73 20 43  |..... Newton's C|
00000010  72 61 64 6c 65 0d 00 14  14 f4 20 42 79 20 53 63  |radle..... By Sc|
00000020  6f 74 74 20 4d 6f 6f 72  65 0d 00 1e 17 f4 20 28  |ott Moore..... (|
00000030  63 29 20 45 6c 65 63 74  72 6f 6e 20 55 73 65 72  |c) Electron User|
00000040  0d 00 28 07 eb 20 32 0d  00 32 0e ef 20 32 39 2c  |..(.. 2..2.. 29,|
00000050  35 30 3b 30 3b 0d 00 3c  28 de 20 4f 46 25 28 34  |50;0;..<(. OF%(4|
00000060  29 2c 46 25 28 34 29 2c  4b 25 28 37 2c 34 29 2c  |),F%(4),K%(7,4),|
00000070  53 25 28 33 36 29 2c 43  25 28 33 36 29 0d 00 46  |S%(36),C%(36)..F|
00000080  14 ef 20 32 33 3b 38 32  30 32 3b 30 3b 30 3b 30  |.. 23;8202;0;0;0|
00000090  3b 0d 00 50 0d e3 20 41  25 3d 30 b8 33 36 0d 00  |;..P.. A%=0.36..|
000000a0  5a 19 53 25 28 41 25 29  3d b5 28 b2 28 41 25 2a  |Z.S%(A%)=.(.(A%*|
000000b0  31 30 29 29 2a 34 30 0d  00 64 19 43 25 28 41 25  |10))*40..d.C%(A%|
000000c0  29 3d 9b 28 b2 28 41 25  2a 31 30 29 29 2a 34 30  |)=.(.(A%*10))*40|
000000d0  0d 00 6e 05 ed 0d 00 78  0f e3 20 41 25 3d 31 20  |..n....x.. A%=1 |
000000e0  b8 20 31 30 0d 00 82 11  f3 20 51 25 2c 57 25 2c  |. 10..... Q%,W%,|
000000f0  45 25 2c 52 25 0d 00 8c  16 f2 43 49 52 43 28 51  |E%,R%.....CIRC(Q|
00000100  25 2c 57 25 2c 45 25 2c  52 25 29 0d 00 96 05 ed  |%,W%,E%,R%).....|
00000110  0d 00 a0 0a e6 20 30 2c  31 34 0d 00 aa 0d ec 20  |..... 0,14..... |
00000120  2d 35 30 2c 33 32 30 0d  00 b4 0d df 20 2d 35 30  |-50,320..... -50|
00000130  2c 36 30 30 0d 00 be 0d  df 20 32 30 30 2c 36 30  |,600..... 200,60|
00000140  30 0d 00 c8 0d df 20 34  30 30 2c 37 30 30 0d 00  |0..... 400,700..|
00000150  d2 0d df 20 38 30 30 2c  37 30 30 0d 00 dc 0d df  |... 800,700.....|
00000160  20 36 30 30 2c 36 30 30  0d 00 e6 0d df 20 38 35  | 600,600..... 85|
00000170  30 2c 36 30 30 0d 00 f0  0d df 20 38 35 30 2c 33  |0,600..... 850,3|
00000180  32 30 0d 00 fa 0d ec 20  38 30 30 2c 37 30 30 0d  |20..... 800,700.|
00000190  01 04 0e df 20 31 30 35  30 2c 37 30 30 0d 01 0e  |.... 1050,700...|
000001a0  0e df 20 31 30 35 30 2c  34 32 30 0d 01 18 0d ec  |.. 1050,420.....|
000001b0  20 34 30 30 2c 37 30 30  0d 01 22 0d df 20 31 35  | 400,700..".. 15|
000001c0  30 2c 37 30 30 0d 01 2c  0d df 20 31 35 30 2c 34  |0,700..,.. 150,4|
000001d0  32 30 0d 01 36 0d ec 20  32 30 30 2c 36 30 30 0d  |20..6.. 200,600.|
000001e0  01 40 0d df 20 36 30 30  2c 36 30 30 0d 01 4a 0e  |.@.. 600,600..J.|
000001f0  e3 20 41 25 3d 31 20 b8  20 34 0d 01 54 11 f3 20  |. A%=1 . 4..T.. |
00000200  51 25 2c 57 25 2c 45 25  2c 52 25 0d 01 5e 16 f2  |Q%,W%,E%,R%..^..|
00000210  43 49 52 43 28 51 25 2c  57 25 2c 45 25 2c 52 25  |CIRC(Q%,W%,E%,R%|
00000220  29 0d 01 68 05 ed 0d 01  72 08 fb 20 31 34 0d 01  |)..h....r.. 14..|
00000230  7c 0e e3 20 41 25 3d 31  20 b8 20 37 0d 01 86 29  ||.. A%=1 . 7...)|
00000240  f3 20 4b 25 28 41 25 2c  31 29 2c 4b 25 28 41 25  |. K%(A%,1),K%(A%|
00000250  2c 32 29 2c 4b 25 28 41  25 2c 33 29 2c 4b 25 28  |,2),K%(A%,3),K%(|
00000260  41 25 2c 34 29 0d 01 90  05 ed 0d 01 9a 34 f1 20  |A%,4)........4. |
00000270  8a 33 2c 32 29 22 4e 65  77 74 6f 6e 27 73 20 63  |.3,2)"Newton's c|
00000280  72 61 64 6c 65 22 20 27  20 27 20 22 20 20 20 42  |radle" ' ' "   B|
00000290  79 20 53 63 6f 74 74 20  4d 6f 6f 72 65 22 0d 01  |y Scott Moore"..|
000002a0  a4 0f e3 20 41 25 3d 31  20 b8 20 31 35 0d 01 ae  |... A%=1 . 15...|
000002b0  10 ef 20 31 39 2c 41 25  2c 30 3b 30 3b 0d 01 b8  |.. 19,A%,0;0;...|
000002c0  05 ed 0d 01 c2 23 ef 20  31 39 2c 31 34 2c 31 3b  |.....#. 19,14,1;|
000002d0  30 3b 31 39 2c 31 32 2c  33 3b 30 3b 31 39 2c 34  |0;19,12,3;0;19,4|
000002e0  2c 33 3b 30 3b 0d 01 cc  12 50 25 3d 31 3a 44 25  |,3;0;....P%=1:D%|
000002f0  3d 31 3a 4c 25 3d 32 0d  01 d6 0e e3 20 58 25 3d  |=1:L%=2..... X%=|
00000300  31 20 b8 20 34 0d 01 e0  12 4f 46 25 28 58 25 29  |1 . 4....OF%(X%)|
00000310  3d 46 25 28 58 25 29 0d  01 ea 14 46 25 28 58 25  |=F%(X%)....F%(X%|
00000320  29 3d 4b 25 28 4c 25 2c  58 25 29 0d 01 f4 05 ed  |)=K%(L%,X%).....|
00000330  0d 01 fe 0e e3 20 58 25  3d 31 20 b8 20 34 0d 02  |..... X%=1 . 4..|
00000340  08 23 ef 20 31 39 2c 4f  46 25 28 58 25 29 2c 30  |.#. 19,OF%(X%),0|
00000350  3b 30 3b 31 39 2c 46 25  28 58 25 29 2c 33 3b 30  |;0;19,F%(X%),3;0|
00000360  3b 0d 02 12 05 ed 0d 02  1c 3c e7 20 4c 25 3d 37  |;........<. L%=7|
00000370  20 84 20 4c 25 3d 31 20  44 25 3d 2d 44 25 20 8b  | . L%=1 D%=-D% .|
00000380  20 e7 20 4c 25 3d 34 20  ff 28 22 4d 4f 54 4f 52  | . L%=4 .("MOTOR|
00000390  22 2b c3 28 50 25 29 29  3a 50 25 3d 50 25 20 82  |"+.(P%)):P%=P% .|
000003a0  20 31 0d 02 26 0c 4c 25  3d 4c 25 2b 44 25 0d 02  | 1..&.L%=L%+D%..|
000003b0  30 0a e5 20 8d 64 56 41  0d 02 3a ae dc 20 37 35  |0.. .dVA..:.. 75|
000003c0  32 2c 36 32 35 2c 31 2c  31 33 2c 37 32 30 2c 35  |2,625,1,13,720,5|
000003d0  38 30 2c 31 2c 32 2c 36  38 30 2c 35 34 34 2c 31  |80,1,2,680,544,1|
000003e0  2c 39 2c 36 30 30 2c 35  30 30 2c 31 2c 31 2c 35  |,9,600,500,1,1,5|
000003f0  35 38 2c 34 37 39 2c 30  2c 30 2c 35 35 30 2c 34  |58,479,0,0,550,4|
00000400  37 35 2c 30 2c 34 2c 35  30 38 2c 34 35 34 2c 30  |75,0,4,508,454,0|
00000410  2c 30 2c 35 30 30 2c 34  35 30 2c 30 2c 34 2c 34  |,0,500,450,0,4,4|
00000420  35 38 2c 34 32 39 2c 30  2c 30 2c 34 30 30 2c 34  |58,429,0,0,400,4|
00000430  30 30 2c 31 2c 38 2c 34  35 30 2c 34 32 35 2c 30  |00,1,8,450,425,0|
00000440  2c 34 2c 33 31 32 2c 33  38 30 2c 31 2c 35 2c 31  |,4,312,380,1,5,1|
00000450  36 30 2c 34 30 30 2c 30  2c 36 2c 32 32 36 2c 33  |60,400,0,6,226,3|
00000460  37 36 2c 31 2c 33 0d 02  44 18 dd 20 f2 43 49 52  |76,1,3..D.. .CIR|
00000470  43 28 58 25 2c 59 25 2c  47 25 2c 43 25 29 0d 02  |C(X%,Y%,G%,C%)..|
00000480  4e 0a e6 47 25 2c 43 25  0d 02 58 0e ec 20 58 25  |N..G%,C%..X.. X%|
00000490  2c 59 25 2b 34 30 0d 02  62 0f e3 20 5a 25 3d 31  |,Y%+40..b.. Z%=1|
000004a0  20 b8 20 33 36 0d 02 6c  0b ec 20 58 25 2c 59 25  | . 36..l.. X%,Y%|
000004b0  0d 02 76 1c f0 20 38 35  2c 58 25 2b 53 25 28 5a  |..v.. 85,X%+S%(Z|
000004c0  25 29 2c 59 25 2b 43 25  28 5a 25 29 0d 02 80 05  |%),Y%+C%(Z%)....|
000004d0  ed 0d 02 8a 0a e6 20 30  2c 43 25 0d 02 94 1c e7  |...... 0,C%.....|
000004e0  20 43 25 3d 34 20 8c 20  8d 74 68 42 20 8b 20 e7  | C%=4 . .thB . .|
000004f0  20 43 25 3d 30 20 e1 0d  02 9e 50 e7 20 59 25 3e  | C%=0 ....P. Y%>|
00000500  34 30 30 3a ec 20 34 30  30 2c 37 30 30 3a df 20  |400:. 400,700:. |
00000510  58 25 2c 59 25 2b 34 30  3a df 20 38 30 30 2c 37  |X%,Y%+40:. 800,7|
00000520  30 30 3a e1 20 8b 20 ec  20 32 30 30 2c 36 30 30  |00:. . . 200,600|
00000530  3a df 20 58 25 2c 59 25  2b 34 30 3a df 20 36 30  |:. X%,Y%+40:. 60|
00000540  30 2c 36 30 30 3a e1 0d  02 a8 13 ec 20 58 25 2d  |0,600:...... X%-|
00000550  32 30 30 2c 59 25 2b 32  30 30 0d 02 b2 0e df 20  |200,Y%+200..... |
00000560  58 25 2c 59 25 2b 34 30  0d 02 bc 13 df 20 58 25  |X%,Y%+40..... X%|
00000570  2b 32 30 30 2c 59 25 2b  32 30 30 0d 02 c6 05 e1  |+200,Y%+200.....|
00000580  0d 02 d0 44 dc 20 38 2c  31 35 2c 31 33 2c 31 33  |...D. 8,15,13,13|
00000590  2c 38 2c 31 35 2c 32 2c  31 31 2c 38 2c 31 31 2c  |,8,15,2,11,8,11,|
000005a0  39 2c 31 31 2c 38 2c 31  2c 31 2c 31 2c 31 2c 35  |9,11,8,1,1,1,1,5|
000005b0  2c 31 2c 31 2c 31 2c 37  2c 33 2c 33 2c 31 2c 37  |,1,1,1,7,3,3,1,7|
000005c0  2c 36 2c 36 0d ff                                 |,6,6..|
000005c6
NEWTON.m0
NEWTON.m1
NEWTON.m2
NEWTON.m4
NEWTON.m5