%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Program of the Julia's Field %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
clear all;
clf;
title('Julia''s field for c = -0.16+i in the complex plan')
hold on;
% Definition of the parameter c
c = -0.16+i;
% Definition of the number of iterations
n_ite = 30;
for x=-1.5:0.001:1.5
for y=-1.0:0.001:1.0
z0 = x + y*i;
z = x + y*i;
% Calcul de la suite
for k = 1:n_ite
z = z^2 + c;
end
% Test on the convergence of the chain and plot of the initial value z0
if abs(z)<2.0
plot(x,y)
hold on
end
end
end
% Plot of the attractive cycle
plot(0,0,'r*')
hold on
Rc = real(c);
Ic = imag(c);
plot(Rc,Ic,'r*')
hold on
c2 = c^2+c;
Rc2 = real(c2);
Ic2 = imag(c2);
plot(Rc2,Ic2,'r*')
hold on