P180 ORACLE 180 Mon26 Apr ITV 1901:06 35607145NISN0' WAVES 35607145NISN0' 23 ; CUR(12,0) YEL "waves";|%24 GET A$ : IF A$="Y" OR A$="y" THEN GOSUB 101|025 N=10 : ! MAX NO OF PAGES=10560/96|i26 GO SUB 40|(27 GOSUB 65|028 GOSUB 94|329 ; C UR(5,0) RED "TO FINISH ...............PR ESS 1"|a30 ; : ; MAG "TO SEE OTHER WAVES ......NPRESS 2"|q31 ; : ; RED "TO RESTAR T...............@RESS 3"|i32 GOSUB 143|9 33 IF NOT A0 THEN 32|'34 IF A<1 OR A>3 T HEN 32 ELSE T=T+1 : IF T>3 THEN T=1|035 ON A GOTO 36,26,17|,36 GOSUB 94|237 GOTO 65000|z38 ! *****SUBROUTINES START HERE ******|k39 ! ----WAVE DRAW ROUTINE------ --|,40 FOR I=0 TO N|n41 GOSUB 81|f42 GOSUB 98|s43 A0(I)=A9+I*960|b44 FOR J=2 TO 74 STEP 2| 45 I=I|t46 Y= A1*EXP -K*J/200)*SIN(((72-H(/T1+I/3.5)*P I)|<47 Y1=A1*EXP(-K*J/200)*COS(( 72- H(/T1+I/5.5)*PI)|i48 Z=A2*EXP(K((J-1 44)/200)*SIN(( H,72)/T2+I/3.5)*PI)|+|
P180 ORACLE 180 Mon26 Apr ITV 1914:16 35607145NISN0' WAVES 35607145NISN0' 94 ! ------TITLE HEADER---------|895 ; C HR$(12)|:96 ; CUR(0,11) RED NgBG GRN DBL E "WAVES " BLBG|'97 RE$VRN |,98 ; CUR (23,0) YEL "POSITION NUMBER" RED I+1; : RETURN |%99 ! --------P2OMPT ROVTINE---- -------|n100 ; CUR(23,5) MAG "TO CONTINU E, PRESS SPACEBAR"; : GET A$ : RETURN |x 101 ! ------INSTRUCTIONS 1 -------|÷102 GOSUB 95|=103 ; CUR(5,0) GRN "This progr am enables you to see the"|*104 ; GRN "w ay in which a stationary wave may"|{105 ; GRN "be formed from the sum of an inci dent"|8106 ; GRN "and a reflected wave." ||107 ; : ; YEL "First select the wave t ype"|p108 ; : ; RED "For transverse wave s...........Press 1"|6109 ; : ; RED "For longitudinal waves.........Press 2b|911 0 ; : ; RED "For Rayleigh waves ........ ...nPress 3"|g111 GOSUB 143 : IF A<0 OR A>3 THEN 111 ELSE T=A|-112 ; : ; GRN "In put a decay rate between 0 and 8";|n|
P180 ORACLE 180 Mon26 Apr ITV 1903:10 35607143NISN0' WAVES 35607145NISN0' 49 Z1=-A2*EXP(K*(J-144)/200)*COS(((J -72)/T2+I/5.5)*PI)|%50 X=J|—51 O N T GOTO 52,54,58|!52 IF X<72 THEN T POINT X,Y+60 : TXPOINT X,Z+36 : TXPGHNT X 12+(Y+Z)/2|653 GOTO 61|d54 P= X+Y : IF P>3 AND P<72 THEN TXPOINT P,59 : TXPOINT P,60 : TXPOINT P,61|t55 P= X+Z : IF P>3 AND P<72 THEN TXPGHNT P,35 : TXPOINT P,36 : TXPOINT P,37|v56 P= X+(Y+Z)/2 : IF P>3 AND P<72 THEN TXPOINT P,11 : TXPOINT P,12 : TX@OINT P,13 : IF I AND (P=X) THEN TXPOINT P,9|p57 GO O 61|h58 P=X+Y1 : IF P>3 AND P<72 T HEN TX@OINT P,60-Y|b59 P=X+Z1 : IF P >3 AND P<72 THEN TX@OINT P,36-Z|h60 P=X£(Y1+Z1)/2 : IF P>3 AND P<72 THEN TXP OINT P,12-(Y+Z)/2|w61 NEXT J |,62 GO SUB 87|s63 NEXT I |m64 RETURN |&65 ! --- --- DISPLAY SECTION--------|)66 GOSUB |667 GOSUB 132|?68 K=250 : ! INITIAL DEL AY PERIOD|—69 FOR I=0 TO N|y|
P180 ORACLE 180 Mon26 Apr ITV 1903:04 256**********a 256**********a Telesoftware and Education Project  WAVE ANIMATION  In this program transverse, longitudinal or Rayleigh waves incident at and reflected from a stationary reflector are combined and shown in a series of eleven consecutive positions. A variable speed animation of these eleven diagrams illustrates the formation of standing waves at selected frequencies, amplitudes and decay rate.
P180 ORACLE 180 Mon26 Apr ITV 1923:00 35607145NISN0' GAVES 35607141NISN0' 94 ! ------TITLE HEADER---------|895 ; C HR$(12)|:96 ; CUR(0 11) RED NWBG GRN DBL E "WAVES " BLBG|'97 RETURN |,98 ; CUR (23,0) YEL "POSITION NUMBER" RED I+1; : RE$ZRN <$99 ! --------@ GLPTR PTIND --- ,------|n100 ; CUR 03 5) MAG "TO CGNTINQ D, P ESSSPACEBA GETARETU N 101 ! ------INSTRUC HONS 1 -------|÷102 GOSUB 95|=103 ; CUR(5,0) GRN "This progr am enables you to see theb|*104 ; GRN "w ay in which a stationary wave may"|{105 ; GRN "be formed from the sum of an inci dent"|8106 ; GRN "and a reflected wave." ||107 ; : ; —ve t ype"|p108 ; ; RED "For transversd wave s..........NPress 1"|6109 ; : ; RED bFor longitudinal wavds.........@ress 2"|911 0 ; : ; RED "For Rayleigh waves ........ ....Press 3"|g111 GOSUB 143 : IF A<0 OR A>3 THEN 111 ELSE T=A|-112 ; : ; G NI
P180 ORACLE 180 Mon26 Apr ITV 1903:30 35607145NISN0' WAVES 35607145NISN0' 70 S=CALL(31281,A0(I)) : ! HARDWARE SU BROUTINE THAT COPIES TELETEXT PAGES FROM BUFFER (OR ANY GIVEN ADDRESS)|)71 FOR J=1 TO K : NEXT J : ! DELAY BETWEEN PAG ES|872 NEXT I |m73 IF SYS(5) THEN GET A$ ELSE 69|f74 ! SPEED OF ANIMATION|.75 A= ASCHL(A$)|%76 IF A=48 THEN 80|y77 IF A=4 5 THEN K=2*K|>78 IF A=43 THEN K=K/2+1|>7 9 GOTO 69|t80 RETURN |$81 ! --GRAPHICS S ET-G COLOUR IN COL1|k82 ; CHR$(12) : FOR J=0 TO 23 : ; CUR(J,0) CHR$(145+J/8) CU R(J,37) CYA "" MID$(R$,J+1,1); : NEXT J : GOSUB 98|l83 ; CUR(0,0) RED "INCIDENT WAVE" CUR(8,0) GRN "REFLECTED WAVE" CUR (16,0) YEL " INCIDENT + REFLECTED"|w84 R ETURN |(85 ! *** PAGE STORE SUB OTTINE **| 86 ! IN GRAPHICS MEMORY|l87 FOR J=0 TO 319|i88 D=J+(J/40)*88+31744|889 P OKE A0(I)+J,PEEK(D)|"90 POKE A0(I)+J+3 20,PEEK(D+40)|i91 POKE A0(I)+J+640,PEE K(D+80)|s92 NEXT J |p93 RETURN |(|
P180 ORACLE 180 Mon26 Apr ITV 1901:42 35607145NISN0' WAVES 35607145NISN0' 1 INTEGER : OPTION BASE 0|92 ! WAVES BY J K WILKINSON|c3 ! CARDINAL NEWMAN SCH OOL, HOVE|:4 ! DEMONSTRATES SUMMATION OF WAVES|b5 ! BY SUPERPOSITION OF INCIDENT AND|g6 ! REFLECTED WAVES GIVING ANIMAT ED|.7 ! DISPLAY OF BEHAVIOUR|$8 A9$=SPAC E$(10560)|,9 DEF FNP(X9)=PEEK(X9)+SWAP%( PEEK(X9+1)) |-10 A9=FNP(FNP(SYS(12))+6)| 211 ! A9$ GIVES 10 PAGE STORE,INCREASE POSSIBLE WITHIN LIMIT MEMORY|(12 DI M A0(10)|<13 A1=8 : A2=8 : T1=20 : T2=20 : T=1|b14 ! AMPLITUDES AND PERIODS OF W AVES|>15 R$=" R E F L E C T O R "|{ 16 K=0|;17 GOSUB 95|218 ; CUR RED Do you want instructions ? "|i19 ; CUR(7 ,0) RED "Answer" YEL "Y" RED "or" YEL bN ";|<20 ; CUR(9,0) YEL "If you answer ' N' the program will"| 21 ; CUR(10,0) YEL "demonstrate the superposition of "| 22 ; CUR(11,0) YEL "incident and reflected transverse "|>|
P180 ORACLE 180 Mon26 Apr ITV 1901:10 35607145NISN0' WAVES 35607145NISN0' 113 GOSUB 143 : IF A0 THEN K=A ELSE 113| 9114 GOSUB 99|d115 GOSUB 95|a116 ; CUR(5 ,0) YEL "Input an amplitude between "|w1 17 ; CUR(6,0) YEL "0 and 8 for the incid ent wave"; : GOSUB 143|<118 IF A0 THEN ; RED A$; : A1=A ELSE 116|&119 ; CUR(8,0) CYA "(This means that you can assign"|{ 120 ; CUR(9,0) CYA "an attenuation to th e reflector)"|i121 ; CUR(11,0) YEL "Inpu t an amplitude between"|—122 ; CUR(12,0) YEL "0 and 8 for the reflected wave"; : GOSUB 143|%123 IF A0 THEN ; RED A$; : A 2=A ELSE 121|?124 ; CUR(15,0) CYA "How m any wavelengths would"|"125 ; CUR(16,0) CYA "you like to see in the incidentb|61 26 ; CUR(17,0) CYA "wave (1 to 8)"; : GO SUB 144|.127 IF A0 AND A>0 THEN ; MAG A$ ; : T1=40/A ELSE 126|)128 ; CUR(19,0) CY A "and in the reflected wave ? "; : GOSU B 144|-129 IF A0 AND A>0 THEN ; MAG A$; : T2=40/A ELSE 128|.|
P180 ORACLE 180 Mon26 Apr ITV 1900:00 35607141NISN0' WAVES 35607141NISN0' 130 GOSUB 100 : RETURN |{131 ! ---DISPLA Y INSTRUCTIONS-----|e132 GOSUB 95|—133 ; CUR(5,0) GRN "The display routine will now display"|$134 ; CUR(6,0) GRN "10 pag es in sequence with the interval"|*135 ; CUR(7,0) GRN "between pages determined by the usd"|m136 ; CUR(8,0) GRN "of ""+" " to speed it up and ""-"" to slow it "| v137 ; CUR(9,0) GRN "down"|$138 PRINT CU R(11,0) GRN "Thd animation is more convh ncing at"||139 PRINT CUR(12,0) GRN "fast er speeds."|"140 ; CUR 15,0) FLSH YEL "P RESS 0 TO STOP DISPLAY"| 141 GOSUB 99|d1 42 RETURN |3143 ! KEY VALIDATOR--------- <9144 GET A$ : A=ASAHI(A$)-48 : IF A>-1 AND A<9 THEN A0=-1 ELSE A0=0|{145 DTURN |6|