This interactive Mandelbrot set viewer is powered by Rust and WebAssembly (WASM). The Mandelbrot set is computed in Rust, compiled to WebAssembly, and rendered in your browser using JavaScript and HTML canvas. Adjust the sliders to change the image size and iteration depth, and use the zoom buttons to explore the fractal in real time!
The Mandelbrot set is a famous mathematical fractal, defined by a simple equation but producing infinitely complex and beautiful patterns. Each point in the set represents a complex number, and the set's intricate boundary is revealed by repeatedly applying a mathematical formula and checking whether the result escapes to infinity.
Rendering the Mandelbrot set is computationally intensive. For each pixel, the program must perform dozens or even hundreds of mathematical iterations to determine if the point belongs to the set. This means millions of calculations for a single image, especially at high resolutions or deep zoom levels.
WebAssembly allows us to run high-performance code (written in languages like Rust) directly in your browser. By moving the heavy computation from JavaScript to Rust compiled to WASM, we achieve much faster rendering and smoother interactivity, even for complex fractals like the Mandelbrot set. This makes real-time exploration possible right in your browser!