iter s = strcat (s, '0 '); n = n +1; endi = 1:2 ^ Niter = num2str (Tmp (i)); tmp1 = s; m = 1: length (tmp) tmp1 (Niter-m +1) = ... (length (tmp)-m +1); end (i, 1: Niter) = tmp1; = [0.4, -0.3733; 0.0600,0.6000]; = [-0.8000, -0.1867; 0.1371,0.8000] ; = [0.3533; 0.000]; a2 = [1.1000; 0.1000]; (1); hold Y = y; = Cod (m, :); i = 1: Niter = Rule (Niter +1- i); tmp == '0 '[XY] = T (NPoints, X, Y, A1, a1); endtmp == '1 '[XY] = T (NPoints, X, Y, A2, a2); end (X, Y,'. ',' MarkerSize ', 1, ...
'MarkerEdgeColor', 'b'); end [X, Y] = T (NPoints, x, y, A, a) = zeros (NPoints, 1); Y = zeros (NPoints, 1); i = 1: NPoints R = [x (i); y (i)]; R = A * R + a; (i) = R (1); Y (i) = R (2); endz = system2 (D, m); = 1; D> = m ^ nn = n +1; endn> 1 = floor (D/m ^ (n-1)) * 10 ^ (n-1); = mod ( D, m ^ (n-1)); b> = mb = system2 (b, m); = a + b; = D; end
3.2.4 Зображення Ліста
В
Малюнок 29 - Лист (ДСІФ)
.2.5 Код програми "Paporotnic.m"
function z = Paporotnic (Niter, NPoints) = 0; y1 = 0; x2 = 1; y2 = 0; x3 = 1/2; y3 = sin (pi/3); = zeros ( NPoints, 1); y = zeros (NPoints, 1); = 1; j <= NPoints = rand (1,1); tmpy = sqrt (3)/2 * rand (1,1); (-sqrt (3 ) * tmpx + tmpy <= 0) & (sqrt (3) * tmpx + tmpy-sqrt (3) <= 0) (j) = tmpx; y (j) = tmpy; j = j +1; end ; end; i = 1:4 ^ Niter Tmp (i) = system2 (i-1, 4); end; = 1; s = '0 '; n