From Wikipedia, the free encyclopedia
No higher resolution available.Cr_orbit_3.png (640 × 480 pixels, file size: 4 KB, MIME type: image/png)
[edit] Summary
[edit] 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)
);
[edit] Licensing
I, the copyright holder of this work, hereby publish it under the following license:
|
File history
Click on a date/time to view the file as it appeared at that time.
| Date/Time | Dimensions | User | Comment |
current | 16:50, 2 March 2008 | 640×480 (4 KB) | Adam majewski | |
File links
The following pages on the English Wikipedia link to this file (pages on other projects are not listed):