from
Nova Fractal
by Ankur Pawar
Nova fractal,Glynn set fractal,other Julia set fractal .
|
| otherjulia2.m |
%other Julia fractal
%formula zn=z=z^3+d*z , where d=1.01*exp(0.1*i);
%
%author:Ankur Pawar
%
%This script takes about 20 seconds to complete the fractal.
%Remove the comment in the last line to save the image of fractal
%
x = linspace(-1.5,1.5,1000);
y = linspace(-1.5,1.5,1000);
z=0+0i;
iter=200;
h_wait=waitbar(0,'Please wait...');
len_x=length(x);
len_y=length(y);
zval =zeros(len_x,len_y);
tic %start timer
for m=1:len_x
for n=1:len_y
k=1;
z=x(n)+y(m)*i;
while ((k<=iter)&&(abs(z)<2))
z=z^3+d*z;
k=k+1;
end
zval(m,n)=k;
end
waitbar(m/len_x,h_wait);
end
toc %stop timer
close(h_wait);
cmap= 1-gray(max(max(zval)));
colormap(cmap);
image(zval);
%imwrite(zval,cmap,'otherjulia2.png','png');
|
|
Contact us at files@mathworks.com