f

#### RE: RE: Re: Mandelbrot Set & Mathematica

Sorry again, but your previous message said >=, not <=. It's still posted on
Google Groups, and I checked to make sure.

DrBob

www.eclecticdreams.net

-----Original Message-----
From: AGUIRRE ESTIBALEZ Julian [mailto:mtpagesj@lg.ehu.es]
Subject:  RE: Re: Mandelbrot Set & Mathematica

On Tue, 11 May 2004, DrBob wrote:

> Sorry, but that just doesn't work, even after changing =BE to >=. There
are
> only two colors (even using your rainbow function), and no fractal
> "antennae".

As noted in a previous message, it should be "<=" instead of ">=": iterate
while test gives True. Sorry for the misprint. As for the colors, I have
no problem with them. The "antennae" are hard to see. You will have to
choose a different region for the DensityPlot, use more points and make
niter larger.

Julian

> -----Original Message-----
> From: AGUIRRE ESTIBALEZ Julian [mailto:mtpagesj@lg.ehu.es]
> Subject:   Re: Mandelbrot Set & Mathematica
>
> On Fri, 7 May 2004, fake wrote:
>
> > I'm looking for a program using Mathematica commands to obtain the
> > Mandelbrot set representation without using the .m file "Fractal"
> have
> > done some tests.
> > TIA
>
> This is what I did for a Dynamical Systems course. It is based on code
> from the help files. It includes knowledge about points that are in the
> Mandelbrot set.
>
> Clear[c, test, niter, BlackWhite, mandelbrot];
> BlackWhite = If[# == 1, GrayLevel[0], GrayLevel[1]]&;
> niter = 100;
> test = (Abs[#] =BE 2) &;
> mandelbrot[c_] := 0 /; Abs[c] > 2;
> mandelbrot[c_] := 1 /; Abs[c + 1] < 1/4;
> mandelbrot[c_] := 1 /; 16 Abs[c]^2 < 5 - 4 Cos[Arg[c]];
> mandelbrot[c_] := (Length@NestWhileList[(#^2+c)&,c,test,1,niter]-1)/niter;
> DensityPlot[mandelbrot[x + y I], {x, -2, .5}, {y, 0, 1},
>     PlotPoints -> {600, 300},
>     Mesh -> False,
>     ImageSize -> 600,
>     AspectRatio -> Automatic,
>     ColorFunction -> BlackWhite];
>
> Color can be added defining new color functions. I like
>
> rainbow = Hue[.8(1 - #)]&
>
> Julian Aguirre
> UPV/EHU
>
>
>
>

Julian Aguirre			| Voice:  +34 946012659
Departamento de Matematicas	| Fax:    +34 944648500
Universidad del Pais Vasco	| Postal: Aptdo. 644, 48080 Bilbao, Spain
| email:  mtpagesj@lg.ehu.es

 0
drbob1 (1163)
5/14/2004 4:19:38 AM
comp.soft-sys.math.mathematica 28821 articles. 0 followers.

1 Replies
861 Views

Similar Articles

[PageSpeed] 12

On Fri, 14 May 2004, DrBob wrote:

> Sorry again, but your previous message said >=, not <=. It's still posted on
> Google Groups, and I checked to make sure.
>
> DrBob

The previous message I refered to was not my original poster. In any case,
it should be "<=". But I found a more serious error in the code. The line

mandelbrot[c_] := 1 /; 16 Abs[c]^2 < 5 - 4 Cos[Arg[c]];

is supposed to represent the points in the cardiod, but defines a
different set. It should be changed to

mandelbrot[c_] := 1 /; Abs[1-Sqrt[1-4c]]<=1;

> -----Original Message-----
> From: AGUIRRE ESTIBALEZ Julian [mailto:mtpagesj@lg.ehu.es]
> Subject:  RE: Re: Mandelbrot Set & Mathematica
>
> On Tue, 11 May 2004, DrBob wrote:
>
> > Sorry, but that just doesn't work, even after changing =BE to >=. There
> are
> > only two colors (even using your rainbow function), and no fractal
> > "antennae".
>
> As noted in a previous message, it should be "<=" instead of ">=": iterate
> while test gives True. Sorry for the misprint. As for the colors, I have
> no problem with them. The "antennae" are hard to see. You will have to
> choose a different region for the DensityPlot, use more points and make
> niter larger.
>
> Julian
>
> > -----Original Message-----
> > From: AGUIRRE ESTIBALEZ Julian [mailto:mtpagesj@lg.ehu.es]
> > Subject:   Re: Mandelbrot Set & Mathematica
> >
> > On Fri, 7 May 2004, fake wrote:
> >
> > > I'm looking for a program using Mathematica commands to obtain the
> > > Mandelbrot set representation without using the .m file "Fractal"
> > have
> > > done some tests.
> > > TIA
> >
> > This is what I did for a Dynamical Systems course. It is based on code
> > from the help files. It includes knowledge about points that are in the
> > Mandelbrot set.
> >
> > Clear[c, test, niter, BlackWhite, mandelbrot];
> > BlackWhite = If[# == 1, GrayLevel[0], GrayLevel[1]]&;
> > niter = 100;
> > test = (Abs[#] =BE 2) &;
> > mandelbrot[c_] := 0 /; Abs[c] > 2;
> > mandelbrot[c_] := 1 /; Abs[c + 1] < 1/4;
> > mandelbrot[c_] := 1 /; 16 Abs[c]^2 < 5 - 4 Cos[Arg[c]];
> > mandelbrot[c_] := (Length@NestWhileList[(#^2+c)&,c,test,1,niter]-1)/niter;
> > DensityPlot[mandelbrot[x + y I], {x, -2, .5}, {y, 0, 1},
> >     PlotPoints -> {600, 300},
> >     Mesh -> False,
> >     ImageSize -> 600,
> >     AspectRatio -> Automatic,
> >     ColorFunction -> BlackWhite];
> >
> > Color can be added defining new color functions. I like
> >
> > rainbow = Hue[.8(1 - #)]&
> >
> > Julian Aguirre
> > UPV/EHU
> >
> >
> >
> >
>
> Julian Aguirre			| Voice:  +34 946012659
> Departamento de Matematicas	| Fax:    +34 944648500
> Universidad del Pais Vasco	| Postal: Aptdo. 644, 48080 Bilbao, Spain
> 				| email:  mtpagesj@lg.ehu.es
>
>
>
>

Julian Aguirre			| Voice:  +34 946012659
Departamento de Matematicas	| Fax:    +34 944648500
Universidad del Pais Vasco	| Postal: Aptdo. 644, 48080 Bilbao, Spain
| email:  mtpagesj@lg.ehu.es

 0
mtpagesj (6)
5/15/2004 1:13:23 AM