Jaime Villate pisze:
> On Fri, 2008-03-14 at 10:38 +0100, Adam Majewski wrote:
>> I would like to draw family of curves:
>> z: abs(zn)=r
>> where
>> r is constant positive number
>> c is constant complex number
>> zn: f(n,z)
>
>> f[n,z] :=
>> if n=0
>> then z
>> else (f[n-1, z]^2 + c);
>>
>> Can I do it in Maxima ?
>
> Sure. Here is one way to do it
>
> (%i2) load(implicit_plot)$
> (%i3) z: x+%i*y$
> (%i4) f[n](z) := if n=0 then z else (f[n-1](z)^2 + c)$
> (%i5) implicit_plot(makelist(abs(ev(f[n](z),c=1))=2,n,0,2), [x,-3,3],
> [y,-3,3])$
>
Your code is working perfectly and is so short. Great. Thx.
But ... now I see that I have given wrong conditions. (:-|
I intended to draw:
http://mathworld.wolfram.com/images/eps-gif/MandelbrotLemniscates_700.gif
So I have change: removed z (it is allways 0 )
and now it is OK ( Your solution showed me the way ).
Here is the code:
======================
load(implicit_plot);
c: x+%i*y;
ER:2; /* Escape Radius = bailout value */
f[n](c) := if n=1 then c else (f[n-1](c)^2 + c);
implicit_plot(makelist(abs(ev(f[n](c)))=ER,n,1,5),
[x,-3,3],[y,-3,3],[nticks, 1000000],
[gnuplot_preamble, "set zeroaxis"]);
===========================
I have make big number for nticks but it didn't make lines more smooth.
Can it be done better ? ( As in Mathemathica )
There is another question :
What if ER <2 ?
I allways thought that it tends to boundary of Mandelbrot set
from inside :
http://mathworld.wolfram.com/PearCurve.htmlhttp://en.wikipedia.org/wiki/Polynomial_lemniscatehttp://www.2dcurves.com/higher/higherm.html
Is it true ?
Curves for ER<2 are diffrent from those for ER>=2 .
Is it an error on below page ?
http://www.2dcurves.com/higher/higherm.html
>(Mario can show you another way of doing it!).
Is it another way ?
> ... my dynamical systems package was
> abandoned for over a year.
> ... I will have to retake the work with that package.
> Please send me any comments or ideas for improvements ...
Maxima is great powerfull tool especially with your packege
( some www help pages from your page are lost ? )
For me I would like to :
- draw(f(x,y),[x,-2,2],[y,-2,2], gradient)
- could choose function ( escape time, potential, external angle, DEM )
- could choose to draw on screen or to the file
- could choose ( and to make manually new) gradients
like :
gradient(RGB, F1, F2,F3)
gradient(HSV, F4,F1,F6)
( If I'm not wrong now it is limited to predefined functions )
Like for example :
http://commons.wikimedia.org/wiki/Image:Mandelbrot_Creation_Animation_%28800x600%29.gif
Because Lisp notation is slightly diffrent from Maxima it is not easy to
change Lisp code for plain Maxima user like me ( now).
Best regards
Adam