I wrote this particularly fugly bit of perl once as a joke for a friend... (needs a terminal with ANSI colour).


#!/usr/bin/perl
($x,$xi,$w,$cmax)=(shift||-2,shift||-1.5,shift||3,9+shift||300);
for ($ai=$xi+$w;$ai>=$xi;$ai-=$w/22){
for ($a=$x;$a<=$x+$w;$a+=$w/75){
($c,$b,$bi)=0;for (;$c<$cmax;$c++){
$b=$b**2-$bi**2+$a+$w/150;$bi=2*($b*$bi)+$ai+$w/44;last if $b**2+$bi**2>100000;}
printf $c==$cmax?"@":"\033[1;".($c%7+31)."m#\033[0m";}printf "\n";}