IMAGES FRACTALES MULTICOLORES

   
100 REM Dragon Couleur 1 (niveau 8)
110 HIRES:PAPER0:INK2:DIM SN(50)
120 INPUT « Entrez un nombre pair (2 a 14) »;NC
130 IF NC = 0 THEN END
140 IF NC/2 <> INT (NC/2) OR NC < 2 OR NC > 50 THEN 100
150 L = 128: FOR C=2 TO NC STEP 2:L=L/2:NEXT
160 X = 70:Y=125:CURSET X,Y,1:X1=X:Y1=Y
170 FOR C = 0 TO NC:SN(C)=0:NEXT C
180 D=0:FOR C=1 TO NC: IF SN(C-1)=SN(C) THEN D=D-1:GOTO 200
190 D=D+1
200 IF D=-1 THEN D=7
210 IF D=8 THEN D=0
220 NEXT
230 IF D=0 THEN X=X+L:GOTO 270
240 IF D=2 THEN Y=Y+L:GOTO 270
250 IF D=4 THEN X=X-L: GOTO 270
260 Y=Y-L
270 DRAW X-X1,Y-Y1,1:SN(NC)=SN(NC) + 1
271 CURSET X1,Y1,3:FILL 6,1,((X+Y)/7-INT((X+Y)/7))*7+17
272 CURSET X1+6,Y1,3:FILL6,1,16
273 CURSET X,Y,3
275 X1=X:Y1=Y
280 FOR C=NC TO 1 STEP -1: IF SN(C)<>2 THEN 300
290 SN(C)=0:SN(C-1)=SN(C-1)+1:NEXT
300 IF SN(0)=0 THEN 180
310 END
100 REM Dragon Couleur 3 (niveau 10)
110 HIRES:PAPER0:INK2:DIM SN(50)
120 INPUT « Entrez un nombre pair (2 a 14) »;NC
130 IF NC = 0 THEN END
140 IF NC/2 <> INT (NC/2) OR NC < 2 OR NC > 50 THEN 100
150 L = 128: FOR C=2 TO NC STEP 2:L=L/2:NEXT
160 X = 70:Y=125:CURSET X,Y,1:X1=X:Y1=Y
170 FOR C = 0 TO NC:SN(C)=0:NEXT C
180 D=0:FOR C=1 TO NC: IF SN(C-1)=SN(C) THEN D=D-1:GOTO 200
190 D=D+1
200 IF D=-1 THEN D=7
210 IF D=8 THEN D=0
220 NEXT
230 IF D=0 THEN X=X+L:GOTO 270
240 IF D=2 THEN Y=Y+L:GOTO 270
250 IF D=4 THEN X=X-L: GOTO 270
260 Y=Y-L
265 REM jouez sur la couleur ligne 271 !
270 DRAW X-X1,Y-Y1,1:SN(NC)=SN(NC) + 1
271 CURSET X1,Y1,3:FILL 1,1,((X+Y)/7-INT((X+Y)/7))*7+17
272 CURSET X1+6,Y1,3:FILL1,1,16
273 CURSET X,Y,3
275 X1=X:Y1=Y
280 FOR C=NC TO 1 STEP -1: IF SN(C)<>2 THEN 300
290 SN(C)=0:SN(C-1)=SN(C-1)+1:NEXT
300 IF SN(0)=0 THEN 180
310 END
100 REM Dragon Couleur 2 (niveau 14)
110 HIRES:PAPER0:INK2:DIM SN(50)
120 INPUT « Entrez un nombre pair (2 a 14) »;NC
130 IF NC = 0 THEN END
140 IF NC/2 <> INT (NC/2) OR NC < 2 OR NC > 50 THEN 100
150 L = 128: FOR C=2 TO NC STEP 2:L=L/2:NEXT
160 X = 70:Y=125:CURSET X,Y,1:X1=X:Y1=Y
170 FOR C = 0 TO NC:SN(C)=0:NEXT C
180 D=0:FOR C=1 TO NC: IF SN(C-1)=SN(C) THEN D=D-1:GOTO 200
190 D=D+1
200 IF D=-1 THEN D=7
210 IF D=8 THEN D=0
220 NEXT
230 IF D=0 THEN X=X+L:GOTO 270
240 IF D=2 THEN Y=Y+L:GOTO 270
250 IF D=4 THEN X=X-L: GOTO 270
260 Y=Y-L
270 DRAW X-X1,Y-Y1,1:SN(NC)=SN(NC) + 1
271 CURSET X1,Y1,3:FILL ?,1,?+17:REM ?=valeurs perdus !
272 CURSET X1+6,Y1,3:FILL?,1,16:REM ?=valeurs perdus !
273 CURSET X,Y,3
275 X1=X:Y1=Y
280 FOR C=NC TO 1 STEP -1: IF SN(C)<>2 THEN 300
290 SN(C)=0:SN(C-1)=SN(C-1)+1:NEXT
300 IF SN(0)=0 THEN 180
310 END
10 REM Même,listing que 1, mais niveau 12 !
100 REM 10 HIRES:PAPER0:INK2:DIM SN(50)
120 INPUT « Entrez un nombre pair (2 a 14) »;NC
130 IF NC = 0 THEN END
140 IF NC/2 <> INT (NC/2) OR NC < 2 OR NC > 50 THEN 100
150 L = 128: FOR C=2 TO NC STEP 2:L=L/2:NEXT
160 X = 70:Y=125:CURSET X,Y,1:X1=X:Y1=Y
170 FOR C = 0 TO NC:SN(C)=0:NEXT C
180 D=0:FOR C=1 TO NC: IF SN(C-1)=SN(C) THEN D=D-1:GOTO 200
190 D=D+1
200 IF D=-1 THEN D=7
210 IF D=8 THEN D=0
220 NEXT
230 IF D=0 THEN X=X+L:GOTO 270
240 IF D=2 THEN Y=Y+L:GOTO 270
250 IF D=4 THEN X=X-L: GOTO 270
260 Y=Y-L
270 DRAW X-X1,Y-Y1,1:SN(NC)=SN(NC) + 1
271 CURSET X1,Y1,3:FILL 6,1,((X+Y)/7-INT((X+Y)/7))*7+17
272 CURSET X1+6,Y1,3:FILL6,1,16
273 CURSET X,Y,3
275 X1=X:Y1=Y
280 FOR C=NC TO 1 STEP -1: IF SN(C)<>2 THEN 300
290 SN(C)=0:SN(C-1)=SN(C-1)+1:NEXT
300 IF SN(0)=0 THEN 180
310 END
100 HIRES:PAPER0:INK7:REM TAPIS 1
110 CURSET 0,0,3:FILL 200,40 ,16
200 FOR Y=0TO189
300 FOR X= 5 TO Y STEP 6
350 C=((X+Y)/7-INT((X+Y)/7))*7+17
400 IF (X AND (Y-X))=0 THEN CURSET 239/2+X,190/2+Y,1:FILL 1,1,C
405 IF (X AND (Y-X))=0 THEN CURSET 239/2+X+6,190/2+Y,1:FILL 1,1,16
410 IF (X AND (Y-X))=0 THEN CURSET 239/2-X,190/2+Y,1:FILL 1,1,C
415 IF (X AND (Y-X))=0 THEN CURSET 239/2-X-6,190/2+Y,1:FILL 1,1,16
420 IF (X AND (Y-X))=0 THEN CURSET 239/2+X,190/2-Y,1:FILL 1,1,C
425 IF (X AND (Y-X))=0 THEN CURSET 239/2+X+6,190/2-Y,1:FILL 1,1,16
430 IF (X AND (Y-X))=0 THEN CURSET 239/2-X,190/2-Y,1:FILL 1,1,C
435 IF (X AND (Y-X))=0 THEN CURSET 239/2-X-6,190/2-Y,1:FILL 1,1,16
440 IF (X AND (Y-X))=0 THEN CURSET 239/2+Y,190/2+X,1:FILL 1,1,C
445 IF (X AND (Y-X))=0 THEN CURSET 239/2+Y+6,190/2+X,1:FILL 1,1,16
450 IF (X AND (Y-X))=0 THEN CURSET 239/2-Y,190/2+X,1:FILL 1,1,C
455 IF (X AND (Y-X))=0 THEN CURSET 239/2-Y-6,190/2þX,1:FILL 1,1,16
460 IF (X AND (Y-X))=0 THEN CURSET 239/2+Y,190/2-X,1:FILL 1,1,C
465 IF (X AND (Y-X))=0 THEN CURSET 239/2+Y+6,190/2-X,1:FILL 1,1,16
470 IF (X AND (Y-X))
100 HIRES:PAPER0:INK7:RE; TAPIS 2
110 CURSET 0,0,3:FILL 200,40 ,16
200 FOR Y=0TO189 STEP 1
300 FOR X= 5 TO Y STEP 6
350 C=((X+Y)/7-INT((X+Y)/7))*7+17
400 IF (X AND (Y-X))=0 THEN CURSET 239/2+X,190/2+Y,1:FILL 6,1,C
405 IF (X AND (Y-X))=0 THEN CURSET 239/2+X+6,190/2+Y,1:FILL 6,1,16
410 IF (X AND (Y-X))=0 THEN CURSET 239þ2-X,190/2+Y,1:FILL 6,1,C
415 IF (X AND (Y-X))=0 THEN CURSET 239/2-X-6,190/2+Y,1:FILL 6,1,16
420 IF (X AND (Y-X))=0 THEN CURSET 239/2+X,190/2-Y,1:FILL 6,1,C
425 IF (X AND (Y-X))=0 THEN CURSET 239/2+X+6,190/2-Y,1:FILL 6,1,16
430 IF (X AND (Y-X))=0 THEN CURSET 239/2-X,190/2-Y,1:FILL 6,1,C
435 IF (X AND (Y-X))=0 THEN CURSET 239/2-X-6,190/2-Y,1:FILL 6,1,16
440 IF (X AND (Y-X))=0 THEN CURSET 239/2+Y,190/2+X,1:FILL 6,1,C
445 IF (X AND (Y-X))=0 THEN CURSET 239/2+Y+6,190/2+X,1:FILL 6,1,16
450 IF (X AND (Y-X))=0 THEN CURSET 239/2-Y,190/2+X,1:FILL 6,1,C
455 IF (X AND (Y-X))=0 THEN CURSET 239/2-Y-6,190/2+X,1:FILL 6,1,16
460 IF (X AND (Y-X))=0 THEN CURSET 239/2+Y,190/2-X,1:FILL 6,1,C
465 IF (X AND (Y-X))=0 THEN CURSET 239/2+Y+6,190/2-X,1:FILL 6,1,16
470 IF (X AND (Y-X))=0 THEN CURSET 239/2-Y,190/2-X,1:FILL 6,1,C
475 IF (X AND (Y-X))=0 THEN CURSET 239/2-Y-6,190/2-X,1:FILL 6,1,16
500 NEXT X
600 NEXT Y
700 END
100 HIRES:PAPER0:INK7:REM TAPIS 3
110 CURSET 0,0,3:FILL 200,40 ,16
200 FOR Y=0TO189 STEP 6
300 FOR X= 0 TO Y STEP 6
350 C=((X+Y+1)/7-INT((X+Y+1)/7))*7+17
400 IF (X AND (Y+1-X))=0 THEN CURSET 239/2+X,190/2+Y,1:FILL 6,1,C
405 IF (X AND (Y+1-X))=0 THEN CURSET 239/2+X+6,190/2+Y,1:FILL 6,1,16
410 IF (X AND (Y+1-X))=0 THEN CURSET 239/2-X,190/2+Y,1:FILL 6,1,C
415 IF (X AND (Y+1-X))=0 THEN CURSET 239/2-X-6,190/2+Y,1:FILL 6,1,16
420 IF (X AND (Y+1-X))=0 THEN CURSET 239/2+X,190/2-Y,1:FILL 6,1,C
425 IF (X AND (Y+1-X))=0 THEN CURSET 239/2+X+6,190/2-Y,1:FILL 6,1,16
430 IF (X AND (Y+1-X))=0 THEN CURSET 239/2-X,190/2-Y,1:FILL 6,1,C
435 IF (X AND (Y+1-X))=0 THEN CURSET 239/2-X-6,190/2-Y,1:FILL 6,1,16
440 IF (X AND (Y+1-X))=0 THEN CURSET 239/2+Y,190/2+X,1:FILL 6,1,C
445 IF (X AND (Y+1-X))=0 THEN CURSET 239/2+Y+6,190/2+X,1:FILL 6,1,16
450 IF (X AND (Y+1-X))=0 THEN CURSET 239/2-Y,190/2+X,1:FILL 6,1,C
455 IF (X AND (Y+1-X))=0 THEN CURSET 239/2-Y-6,190/2+X,1:FILL 6,1,16
460 IF (X AND (Y+1-X))=0 THEN CURSET 239/2+Y,190/2-X,1:FILL 6,1,C
465 IF (X AND (Y+1-X))=0 THEN CURSET 239/2+Y+6,190/2-X,1:FILL 6,1,16
470 IF (X AND (Y+1-X))=0 THEN CURSET 239/2-Y,190/2-X,1:FILL 6,1,C
475 IF (X AND (Y+1-X))=0 THEN CURSET 239/2-Y-6,190/2-X,1:FILL 6,1,16
500 NEXT X
600 NEXT Y
700 END
100 HIRES:PAPER0:INK2:REM DRAGON JAPONAIS
110 X=RND(1):Y=RND(1):Z=RND(1)
120 S1=100:S2=S1*199/239
130 B=1/(SQR(3)):R=2
140 FOR N= 1 TO 26000
150 A=RND(1)
160 IF A<=1/3THENX1=(X+Y*B)/R:Y1=(B*X-Y)/R
170 IFA>=2/3ANDA>1/3THENX1=(X-B*Y)/R+1/R:Y1=(-B*X-Y)/R+B/R
180 IFA>2/3THENX1=(X+Y*B)/R+1:Y1=-(B*X-Y)/R
190 X=X1:Y=Y1:C=(X+Y)*3.5+17
200 IF N>10THEN CURSETS1*X/(1+Z/4þ+30,199/2+S2*Y/(1+Z/4),1:FILL 1,1,C
210 IF N>10THEN CURSETS1*X/(1+Z/4)+36,199/2+S2*Y/(1+Z/4),1:FILL 1,1,16
220 NEXT N