clear all;
figure
hold on;
for repeat=1:10000%0
    Rp=rand();
    %Phi=rand()*2*pi;
     Phi=rand()*(pi/2)-pi/4;
    original=Rp*cos(Phi)+1i*Rp*sin(Phi);
    z0=original;
    Accuracy=0.001;
    Go=1;
    while Go
        z1 = z0 - (z0*z0*z0 + 1)/(3*z0*z0);
        if abs(z1-z0)<Accuracy
           Go=0; 
        end
        z0=z1;
    end
    color='red'; %-1
    if abs(z0 - (0.5000 - 0.8660i))<Accuracy
        color='blue';
    elseif abs(z0 - (0.5000 + 0.8660i))<Accuracy
        color='green';
    end
    plot(real(original),imag(original),color)
   
end
