First off you’ll want to check out Foxy’s post called Contour Maps of Death

mapsd.jpg

to know what this is all about.

The main reason why I post this tribute to his post is that the code he included to create this type of cool plot is for Mathematica and I unfortunately only have Maple and Matlab. So I set out to translate his code so I could create these plots too. I found a simple enough way to do it in Matlab and this is the code of the m-file

a = 3;

for x = -a:0.015:a
for y = -a:0.015:a
z = x+y*i;
f = z*(z-(1+i))*(z-2)*(z-2.5*i);
g = abs(f);
frac = g – fix(g);
h = fix(10*frac);
h2 = mod(h,2);
if h2 == 1
plot(x,y,’.k’,'MarkerSize’,4.5)
hold on;
end
end
end

I haven’t figured out a way to do the same thing with Maple. I believe the approach would have to be slightly different. Still, if you use either Matlab or Mathematica you now have the code to create these cool plots yourself.

On a related note check out Foxy’s blog FoxMaths where you can find plenty of really cool entries on math, be it experimental or else.