§ Фрактал Дракона

10 DIM X(16): DIM Y(16)
20 FOR I=1 TO 4
30 FOR J=1 TO 4
40 LET K=4*I+J-4
50 LET X(K)=J-3: LET Y(K)=I-3
60 NEXT J: NEXT I
70 LET X(2)=0: LET Y(2)=-3
80 LET X(8)=2: LET Y(8)=0
90 LET X(9)=-3: LET Y(9)=-1
100 LET X(15)=-1: LET Y(15)=2
110 FOR I=1 TO 16
120 FOR J=1 TO 16
130 FOR K=1 TO 16
140 LET XX=16*X(I)+4*X(J)+X(K)
150 LET YY=16*Y(I)+4*Y(J)+Y(K)
160 PLOT 126+XX,88+YY
170 NEXT K: NEXT J: NEXT I

§ Папоротник

10 PAPER 0: INK 4: BORDER 0: CLS: LET nx = 0: LET ny = 0: LET x = 0: LET y = 0
20 LET r = RND
30 IF r <= 0.01 THEN GO TO 70
40 IF r <= 0.08 THEN GO TO 80
50 IF r <= 0.15 THEN GO TO 90
60 LET nx = .85 * x + .04 * y
61 LET ny = -.04 * x + .85 * y + 1.6
62 GO TO 100
70 LET nx = 0
71 LET ny = .16 * y
72 GO TO 100
80 LET nx = .2 * x - .26 * y
81 LET ny = .23 * x + .22 * y + 1.6
82 GO TO 100
90 LET nx = -.15 * x + .28 * y
91 LET ny = .26 * x + .24 * y + .44
100 LET x = nx: LET y = ny
110 PLOT OVER 1;128 + x*15, y*15
120 GO TO 20

16 сен, 2021
© 2007-2022 Все мелочи весьма запакованы