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


Groups > comp.soft-sys.math.maple > #311

Re: Black color for main object in Mandelbrot Set

From "I.N. Galidakis" <morpheus@olympus.mons>
Newsgroups comp.soft-sys.math.maple
Subject Re: Black color for main object in Mandelbrot Set
Date 2012-01-14 13:16 +0200
Organization Chaos ->|<- http://ioannis.virtualcomposer2000.com/
Message-ID <1326539818.391767@athprx04> (permalink)
References <jeng5u$bc0$1@speranza.aioe.org> <b9e3d8fd-2fa1-46a0-9646-272247f4e18b@m4g2000vbc.googlegroups.com>

Show all headers | View raw


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.

Back to comp.soft-sys.math.maple | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

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

csiph-web