About this blog

I feel this blog as a reflection of my thoughts to myself , and sometimes as a public diary, and the is my only friend to share my thoughts who says never a "oh no! ,you shouldn't....That is boring...."

My first fractal drawing using Octave for the Mandelbrot



Octave Code:


M=1.5;
N=1.5;
limit=2;
X=linspace(-M,M,1600);
Y=linspace(-N,N,1600);
Maxcount=50;
count=1;
for ii=X
 for jj=Y
  c=ii+jj*i;
  z=0;
  kk=0;
  while abs(z)<limit && kk~=Maxcount
   z=z^2+c;
   ++kk;
  endwhile
  F(count++)=1-kk/Maxcount;
 endfor
endfor
F=reshape(F,[length(X) length(Y)]);
imwrite(F,'Mandelbrotnew.tiff');​


కామెంట్‌లు లేవు: