3D view of critical orbit tending to parabolic fixed point
distance between points of critical orbit in case of attracting fixed point
Maxima source code
/* this is batch file for Maxima. Save it with mac extension.
It computes orbit of Z0 under f(z,c), finds period and draws orbit */
c:-0.2-0.7*%i;
f(z,c):=z*z+c;
z0:0;
iMax:100;
eps:0.01;
/* first point */
z:z0;
orbit:[z];
/* ------------------- compute forward orbit -----------------------------*/
for i:1 thru iMax step 1 do
block
(
z:f(z,c),
orbit:endcons(z,orbit)
/* disp(rectform(orbit[i])) */
);
/* ----------- find period of orbit --------------------------------------*/
IsEqual(c1,c2,eps):=
if abs(realpart(c1)-realpart(c2))<=eps and abs(imagpart(c1)-imagpart(c2))<=eps
then true
else false;
GivePeriod(orbit,eps):=
block
(
period:0,
iLast:length(orbit),
i:iLast,
block
(
loop,
i:i-1,
if not IsEqual(orbit[iLast],orbit[i],eps) then go(loop),
period:iLast-i
)
);
period:GivePeriod(orbit,eps);
print(period);
/*-------------- draw orbit on the screen ----------------------------- */
/* save the z values to 2 lists */
xx:makelist (realpart(z0), i, 1, 1); /* list of re(z) */
yy:makelist (imagpart(z0), i, 1, 1); /* list of im(z) */
for i:2 thru length(orbit) step 1 do
block
(
xx:cons(realpart(orbit[i]),xx),
yy:cons(imagpart(orbit[i]),yy)
);
load(draw);
draw2d(
file_name = "orbit",
terminal = 'png,
yrange = [-1,1],
xrange = [-1,1],
title= concat("Period ",string(period)," orbit of z0=",string(z0)," for c=",string(c)," f(z,c):=z*z+c "),
key = "point of orbit",
xlabel = "Z.re ",
ylabel = "Z.im",
point_type = filled_circle,
point_size = 0.5,
color = red,
points(xx,yy)
);
Licensing
I, the copyright holder of this work, hereby publish it under the following license:
to share – to copy, distribute and transmit the work
to remix – to adapt the work
Under the following conditions:
attribution – You must give appropriate credit, provide a link to the license, and indicate if changes were made. You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use.
share alike – If you remix, transform, or build upon the material, you must distribute your contributions under the same or compatible license as the original.