|
|
Die Mandelbrotmenge
> |
restart;
with (plots): with (geometry):
Warning, the name changecoords has been redefined |
> |
man:= proc (x, y)
local xc, yc, xOld,
yOld, xNew, yNew, i;
xc:= x: yc:= y:
xNew:= 0: yNew:= 0:
i:= 0:
while ((xNew*xNew < 4) and (i < 20)) do
xOld:= xNew: yOld:= yNew:
xNew:= xOld*xOld - yOld*yOld + xc:
yNew:= 2*xOld*yOld + yc:
i:= i + 1;
od:
if i = 20 then 1 else 0 fi;
end: |
> |
depth:= 50;
xAnf:= -2;
xEnd:= 0.5;
yAnf:= -1.25;
yEnd:= 1.25;
xStep:= (xEnd - xAnf)/depth;
yStep:= (yEnd - yAnf)/depth; |







> |
M:= {}:
anz:= 0:
Startzeit:= time ():
x:= xAnf - xStep:
for i to depth do
x:= x + xStep:
y:= yAnf - yStep:
for j to depth do
y:= y + yStep:
if (man(x, y) = 1) then
anz:= anz + 1:
P||anz:= [x, y]:
M:= M union {P||anz}:
fi:
od:
od:
Laufzeit:= time () - Startzeit:
|
> |
pointplot (M, view = [-2..0.5, -1.25..1.25],
symbol =
DIAMOND,
color = black,
axes = boxed); |

> |
anz*Mandelbrotpunkte; Berechnungszeit:= Laufzeit*Sekunden; |


Die Mandelbrotmenge in feinerer Auflösung (allerdings nicht mit Maple kreiert) sieht so aus:

|