Escape Time
The Escape Time algorithm process begins with a fixed complex number \( c \) and iteratively computes the sequence \( z_{n+1} = z_n^2 + c \), for all \( z\). The goal is to determine whether the sequence of values remains bounded or escapes to infinity, depending on whether the magnitude \( |z_n| \) exceeds a given threshold, typically chosen as 2 (the divergence radius \( r \)). The result is usually expressed as either the number of iterations it takes for the sequence to escape (known as the escape time) or a maximum iteration limit if the sequence does not escape.
Edge Detection
The edge detection algorithm is implemented in two stages. First, we use the classic iteration method to determine how many iterations are required for a point to escape the predefined escape radius. Then, the Sobel filter is applied for edge detection. The filter uses two convolution matrices to calculate the gradient in both the horizontal and vertical directions:
For the horizontal direction:
\[ \text{sobelX} = \begin{bmatrix} -1 & 0 & 1 \\ -2 & 0 & 2 \\ -1 & 0 & 1 \end{bmatrix} \]For the vertical direction:
\[ \text{sobelY} = \begin{bmatrix} -1 & -2 & -1 \\ 0 & 0 & 0 \\ 1 & 2 & 1 \end{bmatrix} \] The method identifies areas where there are significant changes, indicating the presence of edges. The method works by examining the differences in intensity between neighboring points in horizontal and vertical directions, which reveals the rate of change in these areas.The algorithm computes the gradient at each point by combining the horizontal and vertical rates of change. If the gradient exceeds a chosen threshold, the point is classified as part of an edge and is marked in black. Otherwise, it is considered part of the background and marked in white.
The result is a high-contrast image that highlights the edges of the Mandelbrot or Julia sets in black, with the rest of the image as a white background.
Inverse Iteration
Inverse Iteration method utilizes the inverse iterative function \( f^{-1}(z) = \pm \sqrt{z - c} \) for the initial point \( z_0 = 1 \).
The method use randomness. Specifically, selecting only one branch at random during each iteration, either \( \sqrt{z - c} \) or \( -\sqrt{z - c} \).
This approach achieves a significantly larger number of rendered points while also accelerating the process. The number of points will no longer grow exponentially.
Remaping
This method involves an iterative transformation of the complex plane, making it one of the most visually intuitive algorithms. It not only effectively demonstrates the dynamics within the complex plane but also provides a clear view of the iterative process itself.
The algorithm uses the inverse iterative formula \( \sqrt{z - c} \), which is repeatedly applied to all points. A significant difference from other algorithms lies in the initial state before the first iteration. Typically, algorithms start with all points in the plane, where the only known information is their position. However, in this method, the process begins with points preselected from a circle of radius 2. These points correspond to those that have not exceeded the divergence radius.
Once these initial points are established, they undergo transformation. This highlights the "path" that points take, from the circle to the approximation of the Julia set. When applying the transformation \( \sqrt{z - c} \), it is essential to understand how the square root operates on a complex number. Specifically, the magnitude of the number (\( |z| \)) is square-rooted, and the angle (\( \theta \)) is halved.
For ease of calculation, the complex number \( z \) is expressed in polar form:
\[ z = |z|(\cos{\theta} + i\sin{\theta}), \]where \( |z| \) represents the magnitude, and \( \theta \) is the angle. After the transformation, the result is:
\[ \sqrt{z} = \sqrt{|z|}(\cos{\frac{\theta}{2}} + i\sin{\frac{\theta}{2}}). \]This polar representation simplifies the iterative computation and provides a clear understanding of the changes at each step, making the algorithm both efficient and illustrative.
Rectangle Checking
The Rectangle Checking method is an optimization technique designed to improve the efficiency of fractal calculations by reducing the number of points that need to be processed. Instead of iterating over all points in an image, this method divides the image into rectangles and checks whether all points on the rectangle's boundaries have the same number of iterations \( k \). If they do, it is assumed that all points inside the rectangle share the same iteration count, and the rectangle is filled with a corresponding color.
Key Steps of the Method:
- Boundary Check: The method calculates the number of iterations for all points along the boundaries of a rectangle. If all boundary points have the same iteration count, the rectangle is marked as homogeneous.
- Recursive Subdivision: If the boundary points do not share the same iteration count, the rectangle is divided into four smaller rectangles. Each smaller rectangle undergoes the same process until the rectangles reach the predefined minimum size.
- Filling Rectangles: Homogeneous rectangles are filled with a single color based on their iteration count. This significantly speeds up the rendering of uniform areas, such as the main cardioid or regions far from the fractal set.
This method accelerates calculations while maintaining the desired level of detail. The user can control the level of granularity by adjusting parameters for the initial rectangle size (determining the maximum size of rectangles) and the minimum rectangle size (defining the smallest rectangles to be processed).
Rendering algorithms for Julia set
Select one of the rendering algorithms for the Julia set from the dropdown menu below to explore each algorithm in detail.