Fractal is usually defined as “a rough or fragmentary geometry, which can be divided into several parts, and each part (at least approximately) is a reduced shape”.
The root fractal theory can be traced back to the year seventeenth Century, and the use of rigorous mathematical treatment of fractal Karl Weilstras, Georg Cantor and Felix Hausdorf began to study on continuous and non differentiable function of a century.
But the fractal term until 1975 by Benwa Mandbo to create a ctus, from the Latin fr, “system”, “broken”.
In a mathematical sense, the generation of fractal is based on an iterative equation.
There are several types of fractals, which can be defined based on the exact self similarity, semi self similarity and statistical self similarity respectively.
Although fractal is a mathematical structure, they can also be found in nature, which makes them to be included in the category of art works. Fractal are applied in the analysis of medicine, soil mechanics, seismology and technology are.

Here is the code to plot koch curve:

function koch_curve(level)

if nargin ~= 1
error('');
end

xl = zeros(10,1);
xr = xl;
yl = xl;
yr = yl;
xr(level) = 1;
r = sqrt(1/3^2 - 1/6^2);
clf;
set(gca,'FontSize',14);
set(gcf,'Color',[1,1,1]);
hold on;
koch1(xl,xr,yl,yr,level,r);
title('Koch Curve');
text(0.5,-0.05,(['Number of iterations: ' num2str(level)]), ...
'HorizontalAlign','center','FontSize',12); 
hold off;
axis equal; axis tight; axis off;

function koch1(xl,xr,yl,yr,level,r)
if (level<2)
plot([xl(1) xr(1)],[-yl(1) -yr(1)],'b-') 
return
end
%Verzweige in niedrigere Stufen
level=level-1;
xl(level)=xl(level+1);
yl(level)=yl(level+1);
xr(level)=1/3*xr(level+1)+2/3*xl(level+1);
yr(level)=1/3*yr(level+1)+2/3*yl(level+1);
subkoch(xl,xr,yl,yr,level,r);
%Mittlerer linker Zweig
xl(level)=xr(level);
yl(level)=yr(level);
xr(level)=.5*xr(level+1)+.5*xl(level+1)-r*(yl(level+1)-yr(level+1));
yr(level)=.5*yr(level+1)+.5*yl(level+1)+r*(xl(level+1)-xr(level+1));
subkoch(xl,xr,yl,yr,level,r);
xl(level)=xr(level);
yl(level)=yr(level);
xr(level)=2/3*xr(level+1)+1/3*xl(level+1);
yr(level)=2/3*yr(level+1)+1/3*yl(level+1);
subkoch(xl,xr,yl,yr,level,r);
xl(level)=xr(level);
yl(level)=yr(level);
xr(level)=xr(level+1);
yr(level)=yr(level+1);
subkoch(xl,xr,yl,yr,level,r);
level=level+1;
return;

Now you can see the image created by you as follows:

Leave a Reply

Your email address will not be published. Required fields are marked *