% just type "mandelbrot" in the Matlab command window to run this clear all col=20; m=700; cx=-.6; cy=0; l=1.5; x=linspace(cx-l,cx+l,m); y=linspace(cy-l,cy+l,m); [X,Y]=meshgrid(x,y); Z=zeros(m); C=X+i*Y; for k=1:col; Z=Z.^2+C; W=exp(-abs(Z)); end opengl software %this is a fix to ensure that Matlab won't crash :) colormap cool; pcolor(W); shading flat; axis('square','equal','off'); set(gcf, 'color', [0.87 0.92 0.98]);