% Dimandala s=0.003; % Stepsize scale=3; % Size of window xpos=0; % Position of window ypos=0; % Position of window [x,y]=meshgrid(scale*(-1:s:1)+xpos,scale*(-1:s:1)+ypos); z=(x+y*i); w=z*0; col=zeros(size(x,1),size(x,2),3); for j=1:10000 w=z./(1+w.^2); % Iterate if (rem(j,10)==0) % Show every tenth iteration %plot(real(w(:)),imag(w(:)),'.') % Plot points %imagesc(angle(w)) % Plot angle % Plot colors col(:,:,1)=(.5+.5*cos(angle(w))); col(:,:,2)=(.5+.5*sin(angle(w))); col(:,:,3)=(1./(1+abs(w))); image(scale*(-1:s:1)+xpos,scale*(-1:s:1)+ypos,col) %pause drawnow % imwrite(col,sprintf('ANM/mandel_0.01_0_1.2_%03d.png',j)); % For animations end end