diff --git a/fractal_project/README.md b/fractal_project/README.md index 49db3e21f6bb3e23bfc0b3bb2b8a745c441289ca..c21aaa9d6d02691b1ad28afbb2b7444317c4c60b 100644 --- a/fractal_project/README.md +++ b/fractal_project/README.md @@ -1,60 +1,6 @@ -# Mandelbrot set +# Fractal sets -1. [Mandelbrot set](./mandelbrot.md) - -# Julia set - -## What is a Julia set? - -A **julia set** is a set of complex numbers that exhibit fascinating, intricate fractal patterns when plotted. These sets are defined for a **fixed complex number** $c$. We repeatedly apply a function to each point in the complex plane and check if the point remains bounded (i.e., it does not escape to infinity). - -The most common function used for Julia sets is the **quadratic** function: - -> $f_{c}(z) = z^{2} + c$ - -Where: - -> * $c$ is a fixed complex number (a constant), chosen by you. -> * $z$ is the point in the complex plane you are testing (a complex number $z=x+y$, where $x$ are real numbers). - -## Calculation of the Julia set - -### 1. Choose a complex constant $c$ - -> * This is the number that defines the Julia set. It's **fixed** for the entire set. -> * Example: Let's take $ c = -0.8 + \imath 0.156 $. - -### 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$. +## How to calculate them -### 3. Start with the point $z$ - -> * Pick a point $z$ from the complex plane. For example, let's start with $z_{0} = 0.5 + 0.5 \imath$ or any other complex number on the grid. - -### 4. Iterate the function $f_{c}(z) = z^{2} + c$ - -> * **First iteration**: Start by applying the function $f_{c}(z)$ to $z_{0}$. -> * **Second iteration**: Now use z_{1} = ... + ... \imath and apply the same function. -> * **Finally**, you repeat this process for several iterations. - -### 5. Check if $\left\lvert z \right\rvert$ (the modulus of $z$) escapes - -> * **Escape condition**: If at any point during the iterations $\left\lvert z_{n} \right\rvert$ (the magnitude of $z_{n}$) exceeds a threshold (commonly $2$), we say the point $z$ escapes and is **not** in the Julia set we stop iterating. - -### 6. Repeat the iteration for a maximum number of iterations - -> * For points that do not escape, we keep iterating until: ->> * The point escapes (i.e., $\left\lvert z_{n} \right\rvert > 2$), ->> * Or we reach a **maximum number of iterations** (often set to something like $100$ to avoid infinite loops). - -### 7. Color the point - -> * If the point $z$ does not escape after the maximum iterations, we say it **belongs to the Julia set**. You can color these points differently. -> * Points that escape after fewer iterations can be colored based on how quickly they escaped (i.e., number of iterations). - -### 8. Repeat for all points in the complex plane - -> * You repeat the above process for every point $z$ in the complex grid. For each point, you perform the iterations, check for escape, and color it. +1. [Mandelbrot set](./mandelbrot.md) +2. [Julia set](./julia.md)