Mandelbrot Fractal Visualisations
February 2026
While there are many different types of fractals, escape-time fractals such as the Mandelbrot set are the perhaps most iconic and beautiful of them all.
Value- and Iteration Thresholding
The way escape-time fractals work is that, for every visible pixel position, we compute the number of iterations (time) for an iterative formula to exceed (escape) a given threshold. Sometimes it won't diverge for a very long time, so we cap the iterations at a maximum possible number for efficiency.
Interestingly, changing both the value threshold and iterations threshold can make the same fractal formula look very different. In this project, the value threshold is constant for the entire visualisation, but the iteration threshold is dependent on the zoom level: the further you zoom, the greater this needs to be to render finer details properly.
Interactive Visualisation
Below, I've compiled the C++ source code for my project in Web Assembly, which lets you embed it into the html code of websites like this one. Please have a play around with the fractal and explore it yourself! Just refresh the page at any time, if you'd like to reset it. You should be able to:
- Drag the fractal around the screen
- Use the scrollwheel to zoom in or out (touchpads and Apple mice aren't compatible)
- Press the Q key to zoom out slowly
Mandelbrot Animations
The following gifs were generated using my C++ program, which is also available on my GitHub here.


Project Development
Porting to C++ and SFML
Porting this from Python to C++ allowed for real-time exploration (zooming and panning) of the fractal, which Python would have otherwise been too slow for, however this took a considerable amount of optimisation (particularly making the complex exponentiation compatible with parallelisation).
Value Threshold: 1024.0
(Enlarged on a straight section)
Gallery
Comparing threshold values
Value Threshold 8.0
Value Threshold 16.0
Value Threshold 1024.0
Lightweight initial visualisations using Jupyter and MatPlotLib
November 2025





