No BSD License  

Highlights from
Mandelbrot120

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

[x,y,Zvalues]=dummy2(lowerR,higherR,lowerI,higherI,stepsR,stepsI,MaxIter,colorMap,viewPoint,x_view,y_view,myLight)
function [x,y,Zvalues]=dummy2(lowerR,higherR,lowerI,higherI,stepsR,stepsI,MaxIter,colorMap,viewPoint,x_view,y_view,myLight)

%This is the short routine that calculates the Mandelbrot set
% Parameter Usage
% This function calculates the mandelbrot set within the limits of 
% lowerR higher R lowerI and higherI
% stepsR stepI maxiter define the image resolution, higher settings mean
% better resolution and more CPU time.
% Colormap ranges from 1-18 and defines the look of the result
% viewPoint: 2 or 3 -> 2 or 3D output
% x_view, y_view: 0-360 define the viewing angle of 3D graphs
% myLight: 1-4; defines the lighting effects used for the graph

% Example 
% [x, y, Zvalues ]=dummy2 (-2,2,-2,2,500,700,25,15,3,29,72,3);
% Example increase MaxIter
% [x, y, Zvalues ]=dummy2 (-2,2,-2,2,500,700,100,15,3,29,72,3);
% Example zoom into mandelbrot Set
% [x, y, Zvalues ]=dummy2 (-1.9,0.8,-1.3,1.28,500,700,100,15,3,29,72,3);

handles.col=colorMap;
handles.view=viewPoint;
%compute other constants  
  Rwidth=higherR-lowerR;
  Iwidth=higherI-lowerI;
  slR=Rwidth/(stepsR-1);
  slI=Iwidth/(stepsI-1);

% Initialize
 
[x,y]=meshgrid((0:stepsR-1)*slR+lowerR,(0:stepsI-1)*slI+lowerI);
Zvalues=ones(size(x));
initZ=zeros(size(x));
c=(x+i*y);
obergrenze=stepsR*stepsI;
z=initZ;
ddx=1/MaxIter;
  h = waitbar(0,'Please wait...');
    h_z=1:(obergrenze);
    for counter=1:MaxIter 
      ddx=ddx+ddx;
      waitbar(ddx)  
      z(h_z)=z(h_z).^2+c(h_z);
      h_z= h_z(logical(abs(z(h_z))<2));
      Zvalues(h_z)=Zvalues(h_z)+1;
    end
    close(h);
color_change(handles.col,handles.view,x,y,Zvalues,x_view,y_view,MaxIter,myLight);

end

Contact us at files@mathworks.com