This is probably ridiculous...but; I need to know how to implement a complex (a.k.a. imaginary) formula type thing in order to generate the mandelbrot set. In fact I'm making this question worth 600 points (and possibly more) in order to have someone help me with this program I need to write for a grade. I'm not looking for someone to write the program for me because then I wouldn't learn anything but I do need alot of help.

For the mandelbrot set the rule is z->z*z+c.

C is the complex number. You may already know this but I should say it any ways.

So I guess to make a run down of this question is.....I need to know how to program complex numbers and then graph them. Could someone please help?

Thank you,

crash

eg.

typedef struct {

double r;

double i;

} Complex;

Now write functions for working with complex numbers.

eg.

Complex Add (Complex x, Complex y) {

Complex z;

z.r = x.r + y.r;

z.i = x.i + y.i;

return z;

}

The rules for complex arithmetic are fairly straighforward (I think that is what ozo was saying.

For graphing, use you graphics library and plot the real part as the x coord and imaginary as the y coord. The details as to how to do this depends on what graphics library you have.