No BSD License  

Highlights from
Mandelbrot120

image thumbnail
from Mandelbrot120 by Dr. Jens Koopmann
Lets you easily zoom into Mandelbrot set (2D/3D)

color_change(col,my_view,x,y,Zvalues,x_view,y_view,maxIter,myLight)
function color_change(col,my_view,x,y,Zvalues,x_view,y_view,maxIter,myLight)
% This function does the coloring and light effect for the Mandel120
% program. It applies several standard a few custom colormaps to fit the
% mandelbrot set.

% Example
% color_change(15,3,x,y,Zvalues,29,72,50,3);
% where x,y,Zvalues are the coordinates that are generated by dummy2.m
% the dummy2.m returns x,y,Zvalues to the worksapce is launched from the
% command line.
%%
%Load custom colormaps

if col < 15 
    myColMaps={@jet;@hsv;@gray;@prism;@cool;@hot;@copper;@pink;@spring;@summer;@autumn;@winter;@bone;@lines};
    colormap(myColMaps{col}(maxIter));
elseif col==15
    load('MyColormaps1','mandelcmap1')
    set(gcf,'Colormap',mandelcmap1)
elseif col==16
    load('MyColormaps2','mandelcmap2')
    set(gcf,'Colormap',mandelcmap2)
elseif col==17
    load('MyColormaps3','Mandelcmap3')
    set(gcf,'Colormap',Mandelcmap3) 
elseif col==18
    load('MyColormaps4','mandelcmap4')
    set(gcf,'Colormap',mandelcmap4)
end
%hier werden die errechneten Daten an Handles ubergegeben.
if my_view == 2 
    pcolor(x,y,log(double(Zvalues)));
elseif my_view == 3
    meshz(x,y,log(double(Zvalues)));
    view([x_view  y_view]);
end
if myLight ==1
    lighting flat;
elseif myLight ==2
    lighting gouraud
elseif myLight ==3 
    lighting phong;
elseif myLight ==4
    lighting none;
end     
shading interp;
axis off

Contact us at files@mathworks.com