About
This is a visualization of the Mandelbrot set: a fractal that is generated by repeatedly squaring and adding complex numbers.
Explanation
Each pixel on screen gets mapped to a certain complex number. Then we take the following equation:
zn+1=zn2+cIn this equation, c is the complex number that originated from a pixel on the screen. For z0, we take the number 0. Next, we iteratively calculate the next z value, which will be the previous value squared plus c. If this value keeps getting bigger and bigger, our c value is not part of the mandelbrot set. We determine if this happens by checking if the value of z exits a circle with radius 2 around the origin.
On the screen, the black pixels represent the complex numbers that are part of the mandelbrot set (the complex numbers where z doesn't leave the circle with radius 2). The white points represent the complex numbers which leave the circle after not many iterations. Some pixels around the fractal are colored grey. These points leave the circle after many iterations, and darker pixels take more iterations than the brighter pixels.
How to use
If you click on a point on screen, it will zoom into that point. By moving the quality slider, it will calculate less pixels, speeding up the process. By moving the iterations slider to the left, the amount of iterations before it is determined that the z value won't leave the circle will increase, which will add more details around the edges of the fractal. The color switch will turn the image into color mode. In this mode, points with more iterations will be colored more blue and the ones with less iterations will be colored more red.