% Dimandala s=0.005; % 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; col=zeros(size(x,1),size(x,2),3); c=1+i*1.5; for j=1:1000 w=c./(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('AN/julia_1.0_1.5_%03d.png',j)); % For animations % end end