Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.maple > #305 > unrolled thread

Black color for main object in Mandelbrot Set

Started by"George Kalas" <kalas@privacy.net>
First post2012-01-12 22:35 +0200
Last post2012-01-14 13:16 +0200
Articles 3 — 3 participants

Back to article view | Back to comp.soft-sys.math.maple


Contents

  Black color for main object in Mandelbrot Set "George Kalas" <kalas@privacy.net> - 2012-01-12 22:35 +0200
    Re: Black color for main object in Mandelbrot Set acer <maple@rogers.com> - 2012-01-13 19:30 -0800
      Re: Black color for main object in Mandelbrot Set "I.N. Galidakis" <morpheus@olympus.mons> - 2012-01-14 13:16 +0200

#305 — Black color for main object in Mandelbrot Set

From"George Kalas" <kalas@privacy.net>
Date2012-01-12 22:35 +0200
SubjectBlack color for main object in Mandelbrot Set
Message-ID<jeng5u$bc0$1@speranza.aioe.org>
Hi everyone,

The following Maple 9 code produces the Madelbrot Set:

with(plots):

MS:=proc(x,y)
local m,z,c;
c:=evalf(x+y*I);
m:=0;z:=0;
to 100 while abs(z)<2 do #100 is the iterations, 2 is the bailout
z:=evalf(z^2+c);
m:=m+1;
od;
log(m);
end:

cx:=0:
cy:=0:
wx:=2:
wy:=wx:

plot3d(MS, cx-wx..cx+wx, cy-wy..cy+wy, grid=[200,200], shading=ZHUE, 
style=PATCHNOGRID, orientation=[-90,0], axes=BOX);

Does anyone see a quick way to change the color of the main set to black instead 
of red?

The way I see it, ZHUE assigns a color to a color palette which comes from 0 to 
100 iterations. Is there a way to except the main object from the ZHUE and color 
it black or do I have to explicitly add code for it?

Thanks,
--
I. 

[toc] | [next] | [standalone]


#308

Fromacer <maple@rogers.com>
Date2012-01-13 19:30 -0800
Message-ID<b9e3d8fd-2fa1-46a0-9646-272247f4e18b@m4g2000vbc.googlegroups.com>
In reply to#305
On Jan 12, 3:35 pm, "George Kalas" <ka...@privacy.net> wrote:
> Hi everyone,
>
> The following Maple 9 code produces the Madelbrot Set:
>
> with(plots):
>
> MS:=proc(x,y)
> local m,z,c;
> c:=evalf(x+y*I);
> m:=0;z:=0;
> to 100 while abs(z)<2 do #100 is the iterations, 2 is the bailout
> z:=evalf(z^2+c);
> m:=m+1;
> od;
> log(m);
> end:
>
> cx:=0:
> cy:=0:
> wx:=2:
> wy:=wx:
>
> plot3d(MS, cx-wx..cx+wx, cy-wy..cy+wy, grid=[200,200], shading=ZHUE,
> style=PATCHNOGRID, orientation=[-90,0], axes=BOX);
>
> Does anyone see a quick way to change the color of the main set to black instead
> of red?
>
> The way I see it, ZHUE assigns a color to a color palette which comes from 0 to
> 100 iterations. Is there a way to except the main object from the ZHUE and color
> it black or do I have to explicitly add code for it?
>
> Thanks,
> --
> I.


Using your `MS` procedure,

P:=plot3d(MS, cx-wx..cx+wx, cy-wy..cy+wy, grid=[200,200],
         shading=ZHUE, style=PATCHNOGRID):

display( plot3d(-0.1,x=-2..2,y=-2..2,color=black),
         P, view=-0.1 .. log(99.5),
         orientation=[-90,0], axes=BOX );

So, all that has been done is to lay it over a black background
( level plane, z=constant),
and to use a `view` which eliminates the topmost portion (m=100). This
allows the black background
to show through the opening. Rotate the whole displayed final 3d plot,
to see more.

- acer

[toc] | [prev] | [next] | [standalone]


#311

From"I.N. Galidakis" <morpheus@olympus.mons>
Date2012-01-14 13:16 +0200
Message-ID<1326539818.391767@athprx04>
In reply to#308
acer wrote:
> On Jan 12, 3:35 pm, "George Kalas" <ka...@privacy.net> wrote:
>> Hi everyone,
>> 
>> The following Maple 9 code produces the Madelbrot Set:
>> 
>> with(plots):
>> 
>> MS:=proc(x,y)
>> local m,z,c;
>> c:=evalf(x+y*I);
>> m:=0;z:=0;
>> to 100 while abs(z)<2 do #100 is the iterations, 2 is the bailout
>> z:=evalf(z^2+c);
>> m:=m+1;
>> od;
>> log(m);
>> end:
>> 
>> cx:=0:
>> cy:=0:
>> wx:=2:
>> wy:=wx:
>> 
>> plot3d(MS, cx-wx..cx+wx, cy-wy..cy+wy, grid=[200,200], shading=ZHUE,
>> style=PATCHNOGRID, orientation=[-90,0], axes=BOX);
>> 
>> Does anyone see a quick way to change the color of the main set to
>> black instead of red?
>> 
>> The way I see it, ZHUE assigns a color to a color palette which
>> comes from 0 to 100 iterations. Is there a way to except the main
>> object from the ZHUE and color it black or do I have to explicitly
>> add code for it? 
>> 
>> Thanks,
>> --
>> I.
> 
> 
> Using your `MS` procedure,
> 
> P:=plot3d(MS, cx-wx..cx+wx, cy-wy..cy+wy, grid=[200,200],
>          shading=ZHUE, style=PATCHNOGRID):
> 
> display( plot3d(-0.1,x=-2..2,y=-2..2,color=black),
>          P, view=-0.1 .. log(99.5),
>          orientation=[-90,0], axes=BOX );
> 
> So, all that has been done is to lay it over a black background
> ( level plane, z=constant),
> and to use a `view` which eliminates the topmost portion (m=100). This
> allows the black background
> to show through the opening. Rotate the whole displayed final 3d plot,
> to see more.
> 
> - acer

Thanks. Works perfectly.
-- 
I.

[toc] | [prev] | [standalone]


Back to top | Article view | comp.soft-sys.math.maple


csiph-web