Take complex numbers that correspond to points on a circle, plug them into the your complex polynomial P() and graph the resulting complex numbers.
What you get is "the image of the circle" under P(). All the code you need for this is:
double R = YOUR_RADIUS; // the radius of your circle Complex Z, W; double x, y; for( int d=0; d < 360; d += 1 ){ // d is the algle in degrees // that runs around the circle Z.PolarSetDegrees( R, d ); // this makes a new complex number // on the circle of radius R W = P( Z ); // W is the "image" of Z W.Get( x, y ); // x, y are coordiantes of the point W // Now graph the point with coords (x, y) } // do the next point on the circle.This is IT. No more code is required. You obtain the coords of 360 points on the circle, you run them through P(), you plot the results. The only thing that remains is to add the line of code that graphs the point. Notice that the coordinates you plug into P() are "real corrds", and the result W = P(Z) also has "real coords". If you plot the pixel at (x, y), two bad things will happen:
double screenX = factorX * x + offsetX; // offsetX == offsetY == 200 double screenY = factorY * y + offsetY; // for a screen 400x400 // factor is the blow-up factor SetColorPixel( screenX, screenY, RGB(255, 0, 0) ); // redSet factorX, factorY to something that fits your picture, and enjoy.
Let me say once again, that nothing of this is strictly necessary to get the result -- the essential functionality of this program is in the few lines above.