X
xyf2001721
Unregistered / Unconfirmed
GUEST, unregistred user!
10 'von Koch curve
20 KEY OFF:SCREEN 2:WINDOW(0,0)-(4/3,1)
30 N=7I=3.141593:L=4:ANGLE=PI/3
40 P$="CD":C$="CACBBCAC"FF SEG=&8000:ADR1=0
50 FOR i=1 TO LEN(P$)
60 POKE ADR1,ASC(MID$,i,1)):ADR1=ADR1+1:NEXT i
70 FOR i=1 TO N:CLS:A=0:L=L/3SET(0,1/3),4:ADR1=0
80 ON PEEK(ADR10-64 GOTO 90,100,110,130
90 A=A+1:GOTO 120
100 A=A-1:GOTO 120
110 LINE -STEP(L*COS(A*ANGLE),L*SIN(A*ANGLE))
120 ADR1=ADR1+1:GOTO 80
130 LOCATE 23,30RINT"von koch crver step";i
140 ADR2=&HFFFF:IF i=N THEN END
150 WHILE ADR1+1
160 ON PEEK(ADR1)-64 GOTO 170,170,180,170
170 POKE ADR2,PEEK(ADR1);GOTO 190
180 GOSUB 250
190 ADR1=ADR1-1:ADR2=ADR2-1
200 WEND
210 WHILE ADR2:ADR1=ADR1+1:ADR2=ADR2+1
220 POKE ADR1,PEEK(ADR2):WEND
230 IF i<N AND INKEY$="" THEN 230
240 NEXT i:END
250 FOR j=1 TO LEN(C$)
260 POKE ADR2,ASC(MID$(C$,LEN(C$)-j+1,1))
270 ADR2=ADR2-1:NEXT j:ADR2=ADR2+1:RETURN
20 KEY OFF:SCREEN 2:WINDOW(0,0)-(4/3,1)
30 N=7I=3.141593:L=4:ANGLE=PI/3
40 P$="CD":C$="CACBBCAC"FF SEG=&8000:ADR1=0
50 FOR i=1 TO LEN(P$)
60 POKE ADR1,ASC(MID$,i,1)):ADR1=ADR1+1:NEXT i
70 FOR i=1 TO N:CLS:A=0:L=L/3SET(0,1/3),4:ADR1=0
80 ON PEEK(ADR10-64 GOTO 90,100,110,130
90 A=A+1:GOTO 120
100 A=A-1:GOTO 120
110 LINE -STEP(L*COS(A*ANGLE),L*SIN(A*ANGLE))
120 ADR1=ADR1+1:GOTO 80
130 LOCATE 23,30RINT"von koch crver step";i
140 ADR2=&HFFFF:IF i=N THEN END
150 WHILE ADR1+1
160 ON PEEK(ADR1)-64 GOTO 170,170,180,170
170 POKE ADR2,PEEK(ADR1);GOTO 190
180 GOSUB 250
190 ADR1=ADR1-1:ADR2=ADR2-1
200 WEND
210 WHILE ADR2:ADR1=ADR1+1:ADR2=ADR2+1
220 POKE ADR1,PEEK(ADR2):WEND
230 IF i<N AND INKEY$="" THEN 230
240 NEXT i:END
250 FOR j=1 TO LEN(C$)
260 POKE ADR2,ASC(MID$(C$,LEN(C$)-j+1,1))
270 ADR2=ADR2-1:NEXT j:ADR2=ADR2+1:RETURN