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

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.

3 comments
Comments feed for this article
April 30, 2007 at 3:20 pm
Contour Maps of Death Revisited « Setting the World on Fire one Flag at a Time
[...] April 30th, 2007 in math This is a follow-up to yesterday’s post. As I was trying to fall asleep yesterday I was thinking; those plots look pretty good, but [...]
May 1, 2007 at 9:49 pm
Contour Maps of Death Explained « Setting the World on Fire one Flag at a Time
[...] May 1st, 2007 in analysis, matlab, math If you thought that posting about these cool plots on Sunday and Monday was going to be enough you were wrong. Though the good news is that I have figured out [...]
October 26, 2008 at 6:16 pm
ExomWehette
Very interesting blog. I want to improve my sad tunnel I have a nice joke for you) What goes “moof”? A cow with buck teeth.