diff --git a/fractal_project/README.md b/fractal_project/README.md index fba577fbece36dca87a7eabb7a06c187db0864b3..587fa52e141868c22f7cb2eaeda805f2d1e48859 100644 --- a/fractal_project/README.md +++ b/fractal_project/README.md @@ -12,10 +12,21 @@ The **Mandelbrot set** is the set of **complex numbers** $c$ for which the funct ### 2. Define the complex plane +> * We need a grid of complex numbers $z$ to iterate over. This grid typically covers a region of the complex plane, like: +>> * Real part $x$ from $-2$ to $2$. +>> * Imaginary part $y$ from $-2$ to $2$. + ### 3. Start with $z_{0} = 0$ +> * For the Mandelbrot set, **we always start with $z = 0$** for every value of $c$. So, the iteration begins from the point $z_{0} = 0$. + ### 4. Iterate the function $f_{c}(z) = z^{2} + c$ +> * Apply the function iteratively to the value $z$ starting from $z_{0} = 0$, using the formula: +>> $f_{c}(z) = z^{2} + c$ +> * For each point $c$, we iterate and check whether $\left\lvert z_{n} \right\rvert$ (the magnitude of $z_{n}$) stays bounded (i.e., does not grow beyond a threshold like $2$). +> * If the value of $\left\lvert z_{n} \right\rvert$ grows beyond $2$, then the point $c$ **is not** part of the Mandelbrot set (i.e., it escapes to infinity). + ### 5. Check if $\left\lvert z \right\rvert$ (the modulus of $z$) escapes ### 6. Repeat the iteration for a maximum number of iterations