clear all;
figure
xlim([0 1000])
ylim([0 1000])
hold on;

Accuracy=0.01;

x = -0.5: 0.001: 0.5;
y = x';
[X,Y] = meshgrid(x,y);

z0 = X + 1i*Y;
original=1.*z0;
depth = 20;
for k = 1:depth
	z0 = z0 - (z0.*z0.*z0 + 1)./(3.*z0.*z0);
end
% sqrt(3)/2 = 0.8660
Red=(abs(z0 - (0.5000 - 0.8660i))<Accuracy)*20;
Green=(abs(z0 - (0.5000 + 0.8660i))<Accuracy)*40;
Blue=(abs(z0 - -1)<Accuracy)*60;
   
image(Red+Green+Blue)
