10 ! \gon av Magnus <8042> 1991 20 ! 30 ! [ndrad loop ("WHILE") med m|jlighet att avsluta, 40 ! ]terst{llning av CRTC:n vid avslut <7759> 50 ! 60 FLOAT : NO EXTEND 70 ATTRIBUTE 1% 80 ; CHR$(12) 90 ; EL RED " \gon av Magnus 1991" 100 ; : ; 'Tangenttryck avslutar (n{r "|gonen" far fram |ver sk{rmen)' 110 ; CUR(6,20);DBLE GRN "V{nta" 120 G=0 130 DEF FNC(X,Y,P,R,C) LOCAL F,E 140 P=P/100 150 F=0 160 E=(2*PI/36) 170 FGPOINT X+2*R,Y 180 WHILE F<2*PI 190 F=F+E 200 FGLINE X+2*(R*COS(F)),Y+P*(1.2*(R*SIN(F))),C 210 WEND 220 RETURN 0 230 FNEND 240 FGCTL BLK+RED+WHT+BLU 250 FGPICTURE 0,0,4 : FGPOINT 0,0,0 : FGFILL 511,239 260 FOR P=0 TO 100 STEP 20 270 Z=FNC(100,100,P,20,1) : Z=FNC(200,100,P,20,1) 280 NEXT P 290 FGPICTURE 1,1,4 : FGPOINT 0,0,0 : FGFILL 511,239 300 FOR P=20 TO 100 STEP 20 310 Z=FNC(100,100,P,20,1) : Z=FNC(200,100,P,20,1) 320 NEXT P 330 Z=FNC(100,100,100,3,3) : Z=FNC(200,100,100,3,3) 340 Z=FNC(100,100,100,1,3) : Z=FNC(200,100,100,1,3) 350 FGPAINT 103,100,3 : FGPAINT 203,100,3 360 FGPAINT 90,100,2 : FGPAINT 110,100,2 370 FGPAINT 190,100,2 : FGPAINT 210,100,2 380 FGPICTURE 2,2,4 : FGPOINT 0,0,0 : FGFILL 511,239 390 FOR P=40 TO 100 STEP 20 400 Z=FNC(100,100,P,20,1) : Z=FNC(200,100,P,20,1) 410 NEXT P 420 Z=FNC(100,100,100,3,3) : Z=FNC(200,100,100,3,3) 430 Z=FNC(100,100,100,1,3) : Z=FNC(200,100,100,1,3) 440 FGPAINT 103,100,3 : FGPAINT 203,100,3 450 FGPAINT 90,100,2 : FGPAINT 210,100,2 460 ; CHR$(12) 470 POKE 65506,0 ! Nolla tgb-flaggan 480 WHILE -1 490 FOR A=20 TO 110 500 V=PEEK(65525) 510 IF V<20 THEN GOSUB 620 ELSE FGCTL BLK+RED+WHT+BLU 520 OUT 56,2,57,A 530 NEXT A 540 FOR A=109 TO 21 STEP -1 550 V=PEEK(65525) 560 IF V<20 THEN GOSUB 620 ELSE FGCTL BLK+RED+WHT+BLU 570 OUT 56,2,57,A 580 NEXT A 590 IF SYS(5%)=0% WEND 600 GET Z$ : OUT 56%,2%,57%,100% ! ]terst{ll CTRC:n 610 END 620 G=G+1 630 IF G<10 THEN FGCTL BLK+RED+WHT+BLU : RETURN 640 IF G=20 THEN FGPICTURE 1,1,4 : RETURN 650 IF G=25 THEN FGPICTURE 0,0,4 : RETURN 660 IF G=30 THEN FGPICTURE 1,1,4 : RETURN 670 IF G=35 THEN FGPICTURE 2,2,4 : G=0 : RETURN 680 FGCTL BLK+RED+WHT+BLU : RETURN