# Why this Mandelbrot program add current point in the Mandelbrot

I read some posts about the Mandelbrot. I read that the Mandelbrot should be defined by $f(z)=z^2+C$. In my understanding, I think, the $C$ should be a constant, like $0.27$ or $2.1+4.5i$. However, in some programming language source code, I found it.

current=Point(x,y)
temp=current
Loop:
temp <- temp * temp + current
iteration <- iteration + 1
goto Loop


I only paste the core calculation part. As you can see from here, the temp is the $z$, and current is $C$. However, the current is changing when it select different point, which means the $C$ is changing. I don't quite understand about it. From the equation, I thought the $C$ should be constant, why it's changing from point to another one. Could someone help me about it?

Best Regards,

-
Well, of course $c$ has to change; from Wikipedia: "a complex number, $c$, is part of the Mandelbrot set if, when starting with $z_0 = 0$ and applying the iteration $z_{n+1} = z_n^2 + c$ repeatedly, the absolute value of $z_n$ never exceeds a certain number however large $n$ gets." You pick points $c$ in the complex plane and iterate... it stands to reason you need to change $c$. – J. M. Sep 3 '11 at 11:45

The Mandelbrot set is a $2$-dimensional section of a $4$-dimensional object, which is dependent on two complex quantities: starting point $z_0$ and $C$. In the Mandelbrot set, $z_0$ is fixed to zero (equivalently, $C$), and $C$ varies. Julia sets are the reverse, $C$ is held constant and $z_0$ varies.