Skip to content
Snippets Groups Projects
Commit 9175904c authored by joachim.schmidt's avatar joachim.schmidt
Browse files

lpsc/fractal_project/julia.md has been added.

parent 51a30556
Branches
No related tags found
No related merge requests found
# 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+\imath 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$.
### 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.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment