A fully interactive open-source GPU-based fully customizable fractal zoom program aimed at creating artistic and high quality images & videos.
Mandelbrot set is a set defined in the complex plane, and consists of all complex numbers which satisfy
Points inside the set are colored black, and points outside the set are colored based on
- Smooth coloring with
$n^{\prime}=n-\log_P\left(\log|Z_n|\right)$ where$n$ is the first iteration number after$|Z_n| \geq 2$ - Fully customizable equation in GLSL syntax, supporting 10 different complex defined functions
- Normal vector calculation for Lambert lighting
- Super-sampling anti aliasing (SSAA)
- Customizable color palette with up to 16 colors
- Hold right-click to see the orbit and the corresponding Julia set for any point
- Zoom sequence creation
2024_Jan_13_22_31_47_19.mp4
2024-05-22.00-45-10.mp4
The expression in the inputs are directly substituted into the GLSL shader code. Because double-precision bivectors are used, most of the built-in GLSL functions are unavailable; and because vector arithmetic such as multiplication or division are component-wise, the following list of custom implemented functions have to be used instead:
Custom functions reference
Double-precision transcendental functions
Function | Definition |
---|---|
double atan2(double, double) |
|
double dsin(double) |
|
double dcos(double) |
|
double dlog(double) |
|
double dexp(double) |
|
double dpow(double, double) |
Complex-defined double-precision functions
Function | Definition |
---|---|
dvec2 cexp(dvec2) |
|
dvec2 cconj(dvec2) |
|
double carg(dvec2) |
|
dvec2 cmultiply(dvec2, dvec2) |
|
dvec2 cdivide(dvec2, dvec2) |
|
dvec2 clog(dvec2) |
|
dvec2 cpow(dvec2, float) |
|
dvec2 csin(dvec2) |
|
dvec2 ccos(dvec2) |
Local variables
You can use these variables in the custom equation however you want
Name | Description |
---|---|
dvec2 c |
Corresponding point in the complex plane of the current pixel |
dvec2 z |
|
dvec2 prevz |
|
int i |
Number of iterations so far |
dvec2 xsq |
|
dvec2 ysq |
|
float degree |
Uniform variable of type float, adjustable from the UI |
int max_iters |
Maximum number of iterations before point is considered inside the set |
double zoom |
Length of a single pixel in screen space in the complex plane |
The first input (dvec2
) is the new value of bool
) is the condition which when true the current pixel will be considered inside the set. The third input (dvec2
) is
Burning ship fractal
Nova fractal
Magnet 1 fractal
- Any custom equation utilizing
dvec2 cpow(dvec2, float)
where the second argument$\not\in [1,4] \cap \mathbb{N}$ will be limited to single-precision floating point, therefore limiting amount of zoom to$10^4$ . - Most of the double-precision transcendental functions are software emulated, which means performance will be severely impacted.
- Maximum zoom is
$10^{14}$ due to finite precision.
Contributions are highly welcome, it could be anything from a typo correction to a completely new feature, feel free to create a pull request or raise an issue!