Generate Newton fractals
Java, 1093 1058 1099 1077 chars

public class F{double r,i,a,b;F(double R,double I){r=R;i=I;}F a(F c){return
new F(r+c.r,i+c.i);}F m(F c){return new F(r*c.r-i*c.i,r*c.i+i*c.r);}F
r(){a=r*r+i*i;return new F(-r/a,i/a);}double l(F c){a=r-c.r;b=i-c.i;return
Math.sqrt(a*a+b*b);}public static void main(String[]a){int
n=a.length,i=0,j,x,K=1024,r[]=new int[n];String o="P3\n"+K+" "+K+"\n255 ",s[];F z=new
F(0,0),P[]=new F[n],R[]=new F[n],c,d,e,p,q;for(;i&lt;n;)P[i]=new
F((s=a[i++].split("i"))[0].isEmpty()?0:Float.parseFloat(s[0]),s.length==1?0:Float.parseFloat(s[1]));double
B=Math.pow(P[n-1].m(P[0].r()).l(z)/2,1./n),b,S;for(i=1;i&lt;n;){b=Math.pow(P[i].m(P[i-1].r()).l(z),1./i++);B=b&gt;B?b:B;}S=6*B/K;for(x=0;x&lt;K*K;){e=d=c=new
F(x%K*S-3*B,x++/K*S-3*B);for(j=51;j--&gt;1;){p=P[0];q=p.m(new
F(n-1,0));for(i=1;i&lt;n;){if(i&lt;n-1)q=q.m(c).a(P[i].m(new
F(n-1-i,0)));p=p.m(c).a(P[i++]);}c=c.a(d=q.r().m(p));if(d.l(z)&lt;S/2)break;}i=j&gt;0?0:n;for(;i&lt;n;i++){if(R[i]==null)R[i]=c;if(R[i].l(c)&lt;S)break;}i=java.awt.Color.HSBtoRGB(i*1f/n,j&lt;1||e.l(c)&lt;S&amp;&amp;r[i]++&lt;1?0:1,j*.02f);for(j=0;j++&lt;3;){o+=(i&amp;255)+" ";i&gt;&gt;=8;}System.out.println(o);o="";}}}


Input is command-line arguments - e.g. run java F 1 0 0 -1. Output is to stdout in PPM format (ASCII pixmap).

The scale is chosen using the Fujiwara bound on the absolute value of the complex roots of a polynomial; I then multiply that bound by 1.5. I do adjust brightness by convergence rate, so the roots will be in the brightest patches. Therefore it's logical to use white rather than black to mark the approximate locations of the roots (which is costing me 41 chars for something which can't even be done "correctly". If I label all points which converge to within 0.5 pixels of themselves then some roots come out unlabelled; if I label all points which converge to within 0.6 pixels of themselves then some roots come out labelled over more than one pixel; so for each root I label the first point encountered to converge to within 1 pixel of itself).

Image for the example polynomial (converted to png with the GIMP):