Home » Posts tagged 'Box Fractals'

# Tag Archives: Box Fractals

## Box Fractals

clc; clear all; close all;

```a = 1;
figure('Position',[0 0 800 800])
for i = 1 :5
[n m] = size(a);
Z = zeros(n,m);
a = [a,Z,a;
a,a,a;
a,Z,a
];
end
imagesc(a);
colormap bone;axis off;
caxis([0, 1]);```

```clc; clear all;
a = 1;
figure('Position',[0 0 800 800])
for i = 1 :5
[n m] = size(a);
Z= zeros(n,m);
a = [Z,a,Z;
a,a,a;
Z,a,Z
];
end
imagesc(a);
colormap bone;axis off;
caxis([0, 1]);```

```clc; clear all;
a = 1;
figure('Position',[0 0 800 800])
for i = 1 :5
[n m] = size(a);
Z= zeros(n,m);
a = [a,a,a;
a,Z,a;
a,a,a
];
end
imagesc(a);
colormap bone;axis off;
caxis([0, 1]);```

```clc; clear all;
a = 1;
figure('Position',[0 0 800 800])
for i = 1 :5
[n m] = size(a);
Z= zeros(n,m);
a = [a,Z,a;
Z,a,Z;
a,Z,a
];
end
imagesc(a);
colormap bone;axis off;
caxis([0, 1]);

```
```clc; clear all;
a = 1;
figure('Position',[0 0 800 800])
for i = 1 :5
[n m] = size(a);
Z= zeros(n,m);
if mod(i,2) == 0
a = [Z,a,a;
a,a,a;
a,a,a
];
else
a = [a,a,a;
a,Z,a;
a,a,a
];
end
end
imagesc(a);
colormap bone;axis off;
caxis([0, 1]);```