Home » Archimedes archive » Acorn User » AU 1997-Xmas B.adf » Regulars » StarInfo/Vibe/WAVE
StarInfo/Vibe/WAVE
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-Xmas B.adf » Regulars |
| Filename: | StarInfo/Vibe/WAVE |
| Read OK: | ✔ |
| File size: | 03DC bytes |
| Load address: | 0000 |
| Exec address: | 0000 |
File contents
10REM > WAVE 20 30Q%=5:S1%=1:S2%=2:PI2=2*PI 40MODE147:MODE19:OFF 50DIM X(500),Y(500),A(500) 60GCOL1:RECTANGLE FILL 0,0,1280,1024:GCOL0:CIRCLE FILL 640,512,500 70COLOUR129 80PRINT'" This simulation shows" 90PRINT" the shape of a wave" 100PRINT" when bouncing on the" 110PRINT" inner wall of a" 120PRINT" circular medium." 130PRINT'" Click mouse" 140PRINT" to start wave." 150*POINTER 160REPEAT:MOUSE MX%,MY%,B%:UNTILB%<>0 AND POINT(MX%,MY%)=0 170*POINTER 0 180C%=0:FORN%=0TO359STEPQ%:C%+=1:X(C%)=MX%:Y(C%)=MY%:A(C%)=RADN%:NEXT:P%=C% 190 200REPEAT 210ONERRORGOTO420 220GCOL1:RECTANGLE FILL 0,0,1280,1024:GCOL0:CIRCLE FILL 640,512,500 230C%=0:FORN%=0TO359STEPQ%:C%+=1 240X1=X(C%)+2*SIN(A(C%)):Y1=Y(C%)+2*COS(A(C%)) 250IF (640-X1)^2+(512-Y1)^2>=250000 THEN 260K=FNA(X(C%),Y(C%)):V=K+PI-A(C%):A(C%)=K+V 270ENDIF 280X(C%)=X(C%)+2*SIN(A(C%)):Y(C%)=Y(C%)+2*COS(A(C%)) 290NEXT 300GCOL3:MOVEX(P%),Y(P%):FOR N%=1 TO P%:DRAW X(N%),Y(N%):NEXT 310SYS 6,112,S1%:SYS 6,113,S2%:WAIT:CLS:SWAP S1%,S2% 320UNTIL0 330 340DEFFNA(X,Y) 350XE=X-640:YE=Y-512 360D=SQR(XE^2+YE^2) 370SI=ASN(XE/D) 380IF YE<=0 SI=PI-SI ELSE SI=PI2+SI 390IF SI>PI2 SI=SI-PI2 400=SI 410 420SYS 6,112,S1%:REPORT:PRINT" at line "STR$ERL:ON
� > WAVE Q%=5:S1%=1:S2%=2:PI2=2*� (�147:�19:� 2� X(500),Y(500),A(500) </�1:ȓ Ȑ 0,0,1280,1024:�0:ȏ Ȑ 640,512,500 F�129 P�'" This simulation shows" Z�" the shape of a wave" d�" when bouncing on the" n�" inner wall of a" x�" circular medium." ��'" Click mouse" ��" to start wave." �*POINTER �(�:ȗ MX%,MY%,B%:�B%<>0 � �MX%,MY%)=0 �*POINTER 0 �AC%=0:�N%=0�359�Q%:C%+=1:X(C%)=MX%:Y(C%)=MY%:A(C%)=�N%:�:P%=C% � �� ���tdA �/�1:ȓ Ȑ 0,0,1280,1024:�0:ȏ Ȑ 640,512,500 �C%=0:�N%=0�359�Q%:C%+=1 �+X1=X(C%)+2*�(A(C%)):Y1=Y(C%)+2*�(A(C%)) �%� (640-X1)^2+(512-Y1)^2>=250000 � +K=�A(X(C%),Y(C%)):V=K+�-A(C%):A(C%)=K+V � 1X(C%)=X(C%)+2*�(A(C%)):Y(C%)=Y(C%)+2*�(A(C%)) "� ,/�3:�X(P%),Y(P%):� N%=1 � P%:� X(N%),Y(N%):� 6-ș 6,112,S1%:ș 6,113,S2%:Ȗ:�:Ȕ S1%,S2% @�0 J TݤA(X,Y) ^XE=X-640:YE=Y-512 hD=�(XE^2+YE^2) rSI=�(XE/D) |� YE<=0 SI=�-SI � SI=PI2+SI �� SI>PI2 SI=SI-PI2 �=SI � �#ș 6,112,S1%:�:�" at line "Þ:� �
00000000 0d 00 0a 0c f4 20 3e 20 57 41 56 45 0d 00 14 04 |..... > WAVE....| 00000010 0d 00 1e 1c 51 25 3d 35 3a 53 31 25 3d 31 3a 53 |....Q%=5:S1%=1:S| 00000020 32 25 3d 32 3a 50 49 32 3d 32 2a af 0d 00 28 0e |2%=2:PI2=2*...(.| 00000030 eb 31 34 37 3a eb 31 39 3a 87 0d 00 32 1a de 20 |.147:.19:...2.. | 00000040 58 28 35 30 30 29 2c 59 28 35 30 30 29 2c 41 28 |X(500),Y(500),A(| 00000050 35 30 30 29 0d 00 3c 2f e6 31 3a c8 93 20 c8 90 |500)..</.1:.. ..| 00000060 20 30 2c 30 2c 31 32 38 30 2c 31 30 32 34 3a e6 | 0,0,1280,1024:.| 00000070 30 3a c8 8f 20 c8 90 20 36 34 30 2c 35 31 32 2c |0:.. .. 640,512,| 00000080 35 30 30 0d 00 46 08 fb 31 32 39 0d 00 50 1e f1 |500..F..129..P..| 00000090 27 22 20 54 68 69 73 20 73 69 6d 75 6c 61 74 69 |'" This simulati| 000000a0 6f 6e 20 73 68 6f 77 73 22 0d 00 5a 1b f1 22 20 |on shows"..Z.." | 000000b0 74 68 65 20 73 68 61 70 65 20 6f 66 20 61 20 77 |the shape of a w| 000000c0 61 76 65 22 0d 00 64 1c f1 22 20 77 68 65 6e 20 |ave"..d.." when | 000000d0 62 6f 75 6e 63 69 6e 67 20 6f 6e 20 74 68 65 22 |bouncing on the"| 000000e0 0d 00 6e 17 f1 22 20 69 6e 6e 65 72 20 77 61 6c |..n.." inner wal| 000000f0 6c 20 6f 66 20 61 22 0d 00 78 18 f1 22 20 63 69 |l of a"..x.." ci| 00000100 72 63 75 6c 61 72 20 6d 65 64 69 75 6d 2e 22 0d |rcular medium.".| 00000110 00 82 14 f1 27 22 20 43 6c 69 63 6b 20 6d 6f 75 |....'" Click mou| 00000120 73 65 22 0d 00 8c 16 f1 22 20 74 6f 20 73 74 61 |se"....." to sta| 00000130 72 74 20 77 61 76 65 2e 22 0d 00 96 0c 2a 50 4f |rt wave."....*PO| 00000140 49 4e 54 45 52 0d 00 a0 28 f5 3a c8 97 20 4d 58 |INTER...(.:.. MX| 00000150 25 2c 4d 59 25 2c 42 25 3a fd 42 25 3c 3e 30 20 |%,MY%,B%:.B%<>0 | 00000160 80 20 b0 4d 58 25 2c 4d 59 25 29 3d 30 0d 00 aa |. .MX%,MY%)=0...| 00000170 0e 2a 50 4f 49 4e 54 45 52 20 30 0d 00 b4 41 43 |.*POINTER 0...AC| 00000180 25 3d 30 3a e3 4e 25 3d 30 b8 33 35 39 88 51 25 |%=0:.N%=0.359.Q%| 00000190 3a 43 25 2b 3d 31 3a 58 28 43 25 29 3d 4d 58 25 |:C%+=1:X(C%)=MX%| 000001a0 3a 59 28 43 25 29 3d 4d 59 25 3a 41 28 43 25 29 |:Y(C%)=MY%:A(C%)| 000001b0 3d b2 4e 25 3a ed 3a 50 25 3d 43 25 0d 00 be 04 |=.N%:.:P%=C%....| 000001c0 0d 00 c8 05 f5 0d 00 d2 0b ee 85 e5 8d 74 64 41 |.............tdA| 000001d0 0d 00 dc 2f e6 31 3a c8 93 20 c8 90 20 30 2c 30 |.../.1:.. .. 0,0| 000001e0 2c 31 32 38 30 2c 31 30 32 34 3a e6 30 3a c8 8f |,1280,1024:.0:..| 000001f0 20 c8 90 20 36 34 30 2c 35 31 32 2c 35 30 30 0d | .. 640,512,500.| 00000200 00 e6 1b 43 25 3d 30 3a e3 4e 25 3d 30 b8 33 35 |...C%=0:.N%=0.35| 00000210 39 88 51 25 3a 43 25 2b 3d 31 0d 00 f0 2b 58 31 |9.Q%:C%+=1...+X1| 00000220 3d 58 28 43 25 29 2b 32 2a b5 28 41 28 43 25 29 |=X(C%)+2*.(A(C%)| 00000230 29 3a 59 31 3d 59 28 43 25 29 2b 32 2a 9b 28 41 |):Y1=Y(C%)+2*.(A| 00000240 28 43 25 29 29 0d 00 fa 25 e7 20 28 36 34 30 2d |(C%))...%. (640-| 00000250 58 31 29 5e 32 2b 28 35 31 32 2d 59 31 29 5e 32 |X1)^2+(512-Y1)^2| 00000260 3e 3d 32 35 30 30 30 30 20 8c 0d 01 04 2b 4b 3d |>=250000 ....+K=| 00000270 a4 41 28 58 28 43 25 29 2c 59 28 43 25 29 29 3a |.A(X(C%),Y(C%)):| 00000280 56 3d 4b 2b af 2d 41 28 43 25 29 3a 41 28 43 25 |V=K+.-A(C%):A(C%| 00000290 29 3d 4b 2b 56 0d 01 0e 05 cd 0d 01 18 31 58 28 |)=K+V........1X(| 000002a0 43 25 29 3d 58 28 43 25 29 2b 32 2a b5 28 41 28 |C%)=X(C%)+2*.(A(| 000002b0 43 25 29 29 3a 59 28 43 25 29 3d 59 28 43 25 29 |C%)):Y(C%)=Y(C%)| 000002c0 2b 32 2a 9b 28 41 28 43 25 29 29 0d 01 22 05 ed |+2*.(A(C%)).."..| 000002d0 0d 01 2c 2f e6 33 3a ec 58 28 50 25 29 2c 59 28 |..,/.3:.X(P%),Y(| 000002e0 50 25 29 3a e3 20 4e 25 3d 31 20 b8 20 50 25 3a |P%):. N%=1 . P%:| 000002f0 df 20 58 28 4e 25 29 2c 59 28 4e 25 29 3a ed 0d |. X(N%),Y(N%):..| 00000300 01 36 2d c8 99 20 36 2c 31 31 32 2c 53 31 25 3a |.6-.. 6,112,S1%:| 00000310 c8 99 20 36 2c 31 31 33 2c 53 32 25 3a c8 96 3a |.. 6,113,S2%:..:| 00000320 db 3a c8 94 20 53 31 25 2c 53 32 25 0d 01 40 06 |.:.. S1%,S2%..@.| 00000330 fd 30 0d 01 4a 04 0d 01 54 0c dd a4 41 28 58 2c |.0..J...T...A(X,| 00000340 59 29 0d 01 5e 15 58 45 3d 58 2d 36 34 30 3a 59 |Y)..^.XE=X-640:Y| 00000350 45 3d 59 2d 35 31 32 0d 01 68 12 44 3d b6 28 58 |E=Y-512..h.D=.(X| 00000360 45 5e 32 2b 59 45 5e 32 29 0d 01 72 0e 53 49 3d |E^2+YE^2)..r.SI=| 00000370 98 28 58 45 2f 44 29 0d 01 7c 1f e7 20 59 45 3c |.(XE/D)..|.. YE<| 00000380 3d 30 20 53 49 3d af 2d 53 49 20 8b 20 53 49 3d |=0 SI=.-SI . SI=| 00000390 50 49 32 2b 53 49 0d 01 86 16 e7 20 53 49 3e 50 |PI2+SI..... SI>P| 000003a0 49 32 20 53 49 3d 53 49 2d 50 49 32 0d 01 90 07 |I2 SI=SI-PI2....| 000003b0 3d 53 49 0d 01 9a 04 0d 01 a4 23 c8 99 20 36 2c |=SI.......#.. 6,| 000003c0 31 31 32 2c 53 31 25 3a f6 3a f1 22 20 61 74 20 |112,S1%:.:." at | 000003d0 6c 69 6e 65 20 22 c3 9e 3a ee 0d ff |line "..:...| 000003dc
.