10 REM Colour Cycling v2 20 REM 05/03/94 (PD) 30 40 P%=100:I%=10 50 segments=48 60 x=640 70 y=512 80 radius=300 90 100 ONERROR RUN 110 REPEAT 120 REPEAT 130 MODE7 140 PROCstart 150 UNTILG=49 OR G=50 OR G=32 160 IFG=32 GOTO 230 170 MODE2 180 VDU23;8202;0;0;0; 190 *FX4,1 200 IF G=49 OSCLI("LDPIC WAVES") ELSE PROCdrawcircle 210 PROCcycle 220 UNTIL FALSE 230 *FX4,0 240 MODE7:PRINT'"‚This program by:"'"…Jock…Smylie (5/3/94) - Australia."' 250 END 260 270 DEFPROCcycle 280 REPEAT 290 FORA%=1TO7 300 FORB%=1TO7 310 C%=(A%+B%)MOD 7 320 IFC%=0 C%=7 330 VDU19,B%,C%;0; 340 NEXT 350 FORT%=1TOP%:NEXT 360 IF INKEY(0)=138 P%=P%+I% 370 IF INKEY(0)=139 P%=P%-I% 380 IF INKEY-99 ENDPROC 390 IF P%<0 P%=0 400 NEXT 410 UNTIL FALSE 420 ENDPROC 430 440 DEFPROCdrawcircle 450 A=2*PI/segments 460 CS=COS(A) 470 SN=SIN(A) 480 X1=x 490 Y1=y+radius 500 MOVE X1,Y1 510 FOR steps=1 TO segments 520 GCOL0,1+steps MOD 6 530 X2=x+(X1-x)*CS-(Y1-y)*SN 540 Y2=y+(X1-x)*SN+(Y1-y)*CS 550 MOVE x,y 560 PLOT 85,X2,Y2 570 X1=X2 580 Y1=Y2 590 NEXT 600 ENDPROC 610 620 DEFPROCstart 630 VDU23;8202;0;0;0; 640 PRINT'" C‚oƒl„o…u†r ‡Cy‚cƒl„i…n†g" 650 PRINT''"‚A program to demonstrate one technique‚‚of colour cycling." 660 PRINT'"‚This program was written in response ‚‚‚to a request from Andrew Snodgrass for‚‚help with his 'Wavey' program in Issue‚‚29 of 8-Bit Software." 670 PRINT''"†Press <1> for 'Wavey' animation" 680 PRINT'"†Press <2> for Wheel animation" 690 PRINT''"‚Press up and down cursor keys to ‚increase or decrease the rate of ‚colour cycling, to exit." 700 PRINT'"‚Note the circle drawing procedure for ‚‚a relatively fast circle drawing ‚algorithm in Basic."; 710 G=GET 720 ENDPROC