General Exponent
The generalized Julia set is an extension of the classical Julia set. Instead of the standard quadratic function \( f_c(z) = z^2 + c \), we consider a more general family of functions of the form: $$ f_c(z) = z^d + c, $$ where \( d \in \mathbb{Q} \) (a rational number), allowing for fractional exponents. The generalized Julia set is defined as the set of complex numbers \( z \) for which the sequence of iterates \( z_{n+1} = f_c(z_n) \), starting from any initial value \( z_0 \), remains bounded for a fixed complex parameter \( c \).
To calculate the powers of complex numbers efficiently, polar coordinates are used, as the general power \( z^d \) can be expressed in polar form as: $$ z^d = |z|^d e^{i d \theta} = |z|^d (\cos(d \theta) + i \sin(d \theta)), $$ where \( |z| \) is the modulus and \( \theta \) is the argument of \( z \). This representation allows easy computation of both the real and imaginary parts of \( z^d \): $$ \operatorname{Re}(z^d) = |z|^d \cos(d \theta), $$ $$ \operatorname{Im}(z^d) = |z|^d \sin(d \theta). $$
This approach enables the visualization of the generalized Julia set for any rational value of \( d \), producing intricate and diverse fractal structures that depend on the choice of both the parameter \( c \) and the initial value \( z_0 \).
Sinus
The Julia sets for non-polynomial functions offer a fascinating extension to the classical quadratic mapping \( f(z) = z^2 + c \). In this case, we consider the function: \[ f(z) = c \sin(z), \] where \( c \) is a complex constant. The process is similar to the quadratic mapping: we select a constant \( c \), and for each point \( z_0 \), we iterate the function \( f(z) \). The behavior of the sequence of points produced during the iterations determines whether \( z_0 \) belongs to the Julia set.
A notable difference lies in determining whether a point diverges before reaching the maximum number of iterations. Instead of checking the magnitude of \( z \), we can reliably determine divergence using only the value of \( z_x \) (real part of $z$), simplifying the computation process. A common choice for the divergence radius is \( r_c = 50 \).
The complex sine function can be expressed as: \[ c \sin(z) = (c_x + i c_y)(\sin(z_x) \cosh(z_y) + i \cos(z_x) \sinh(z_y)), \] where \( \cosh \) and \( \sinh \) are the hyperbolic cosine and sine functions, respectively. This representation can be split into the real and imaginary parts, which is advantageous for implementation: \[ \text{Re}(c \sin(z)) = c_x \sin(z_x) \cosh(z_y) - c_y \cos(z_x) \sinh(z_y), \] \[ \text{Im}(c \sin(z)) = c_x \cos(z_x) \sinh(z_y) + c_y \sin(z_x) \cosh(z_y). \]
Cosinus
The Julia sets for the complex cosine function follow a similar approach to those generated using the sine function. The function is defined as: \[ f(z) = c \cos(z), \] where \( c \) is a complex constant. For a given constant \( c \), the function is iteratively applied to each point \( z_0 \), and the sequence of iterated values determines whether \( z_0 \) belongs to the Julia set.
As with the sine function, divergence can be reliably determined by evaluating only the real part of \( z \) (\( z_x \)), rather than computing the magnitude of \( z \). This simplifies the process of determining whether a point diverges before reaching the maximum number of iterations. A common choice for the divergence radius is \( r_c = 50 \).
The complex cosine function is expressed as: \[ c \cos(z) = (c_x + i c_y) \left( \cos(z_x) \cosh(z_y) - i \sin(z_x) \sinh(z_y) \right), \] where \( \cosh \) and \( \sinh \) are the hyperbolic cosine and sine functions, respectively. This can be broken into real and imaginary parts for implementation purposes: \[ \text{Re}(c \cos(z)) = c_x \cos(z_x) \cosh(z_y) + c_y \sin(z_x) \sinh(z_y), \] \[ \text{Im}(c \cos(z)) = -c_x \sin(z_x) \sinh(z_y) + c_y \cos(z_x) \cosh(z_y). \]
By utilizing only the real part \( z_x \), divergence tests for the cosine function are both efficient and computationally straightforward.
Generalized Julia set
The Julia sets for the exponential function provide another fascinating generalization of the classical quadratic and trigonometric mappings. The function is defined as: \[ f(z) = \lambda e^z, \] where \( \lambda = \lambda_x + i \lambda_y \). The real and imaginary parts of this function are expressed as follows: \[ \begin{aligned} \text{Re}(\lambda e^z) &= \alpha e^{u_x} (\lambda_x \cos(u_y) - \lambda_y \sin(u_y)) + (1 - \alpha) \text{Re}(z_0), \\ \text{Im}(\lambda e^z) &= \alpha e^{u_x} (\lambda_x \sin(u_y) + \lambda_y \cos(u_y)) + (1 - \alpha) \text{Im}(z_0), \end{aligned} \] where \( \alpha \in [0,1] \) is a weight parameter and \( z_0 \) represents the initial value.
The variables \( u_x \) and \( u_y \) are transformations involving \( \lambda_x \), \( \lambda_y \), and another parameter \( \beta \): \[ \begin{aligned} u_x &= \beta \exp(z_x) (\lambda_x \cos(z_y) - \lambda_y \sin(z_y)) + (1 - \beta) z_x, \\ u_y &= \beta \exp(z_x) (\lambda_x \sin(z_y) + \lambda_y \cos(z_y)) + (1 - \beta) z_y. \end{aligned} \]
The iterative loop in the code executes in the usual manner: a point either reaches the maximum number of iterations or its real part exceeds the divergence radius.
For visualization, a special color palette is used to highlight the rate of divergence of points: \[ \text{Color} = \begin{cases} \text{Red} & \text{if } \texttt{iter} < 0.2 \cdot \texttt{maxIter}, \\ \text{Orange} & \text{if } 0.2 \cdot \texttt{maxIter} \leq \texttt{iter} < 0.4 \cdot \texttt{maxIter}, \\ \text{Yellow} & \text{if } 0.4 \cdot \texttt{maxIter} \leq \texttt{iter} < 0.6 \cdot \texttt{maxIter}, \\ \text{Green} & \text{if } 0.6 \cdot \texttt{maxIter} \leq \texttt{iter} < 0.8 \cdot \texttt{maxIter}, \\ \text{Blue} & \text{if } 0.8 \cdot \texttt{maxIter} \leq \texttt{iter} < 0.9 \cdot \texttt{maxIter}, \\ \text{Purple} & \text{if } 0.9 \cdot \texttt{maxIter} \leq \texttt{iter} < \texttt{maxIter}, \\ \text{Black} & \text{if } \texttt{iter} == \texttt{maxIter}. \end{cases} \] This palette enhances the visual representation by distinctly coloring regions based on the speed of divergence, making the structure of the Julia set more apparent.
Generalized Julia set
Choose an iteration function for the generalized Julia set from the dropdown menu below to explore each generalization in detail.