Fractal Generator

Explore the infinite complexity of the Mandelbrot set — one of the most famous fractals in mathematics. Zoom into self-similar patterns, adjust iteration depth, and generate high-quality fractal art.

Color: iteration count → gradient Center: (-0.5, 0) | Width: 3.0
View controls
100
Explore famous locations
Click to teleport and render.
All calculations done locally in your browser. No data is transmitted.

The Mandelbrot Set: Mathematical Definition & Beauty

The Mandelbrot set is defined as the set of complex numbers \(c\) for which the function \(f_c(z) = z^2 + c\) does not diverge when iterated from \(z = 0\). In other words, the sequence \(z_{n+1} = z_n^2 + c\) remains bounded. Points inside the set are colored black, while points outside receive colors based on how quickly they escape to infinity.

\( z_0 = 0, \quad z_{n+1} = z_n^2 + c \)
\( c \in \mathbb{C} \) belongs to the Mandelbrot set if \( \limsup_{n\to\infty} |z_n| \le 2 \).

First visualized by Robert W. Brooks and Peter Matelski in 1978, and later popularized by Benoit Mandelbrot, this set exhibits infinite detail, self-similarity, and a boundary that is a fractal of Hausdorff dimension 2. Our generator computes the escape time for each pixel and maps it to a smooth gradient, revealing the intricate filaments and spirals that surround the cardioid.

Interactive Exploration

  • Zoom & pan: Use the numeric controls or presets to navigate to famous regions.
  • Iteration depth: Higher iterations reveal more detail in deep zooms but take longer to compute. Start with 100 for general exploration.
  • Color mapping: The gradient cycles from black (inside set) through blue, cyan, yellow, red to white for fast escape. The smoother the gradient, the more visually appealing the structure.
Mathematical Significance

The Mandelbrot set is not just an artistic curiosity; it connects to chaos theory, complex dynamics, and even number theory. The boundary of the set is where the behavior of the iteration changes dramatically — regions of stability versus chaos. The set's cardioid shape corresponds to the set of parameters for which the iteration has an attracting fixed point. The bulbs attached to it correspond to periodic cycles of higher orders. Our tool allows you to witness these mathematical phenomena visually.

Practical Applications & Educational Value

  • Mathematics education: Visualizes complex numbers, iteration, and convergence in an intuitive way.
  • Computer graphics: Fractal generation techniques are used in terrain generation, texture synthesis, and artistic design.
  • Popular culture: The Mandelbrot set has appeared in albums, movies, and as a symbol of mathematical beauty.
  • Research: Used in studying dynamical systems, Julia sets, and the parameter plane of quadratic maps.

Frequently Asked Questions

The canvas resolution is fixed at 700×700 pixels. For extreme zooms, you are effectively viewing a tiny portion of the set, so the detail is limited by pixel density. Higher iteration counts can reveal more detail within each pixel, but ultimate sharpness requires supersampling or larger canvas size. For deep zoom, increase max iterations to 500 or more and be patient — the calculation will take a few seconds.

The Mandelbrot set is a map of all possible Julia sets. For each point \(c\) in the complex plane, there is a corresponding Julia set (the set of \(z\) for which \(z \to z^2+c\) does not diverge). The Mandelbrot set organizes these Julia sets: if \(c\) is inside the Mandelbrot set, the associated Julia set is connected; if outside, it is a Cantor dust. Our generator focuses on the Mandelbrot parameter plane.

The algorithm uses the standard escape radius of 2.0 and iterates until the maximum iteration count. The smooth coloring formula (normalized iteration count) gives a continuous gradient, avoiding banding. For points that escape quickly, the color is determined by the fractional part of the log of the final magnitude. This produces the smooth gradients you see.

Yes! Right-click on the canvas and select "Save image as..." or use your browser's screenshot tools. We plan to add a dedicated export button in a future update.
Implementation based on the classic escape time algorithm described in "The Science of Fractal Images" by Peitgen & Saupe. The smooth coloring formula is derived from continuous potential theory. All rendering is done with WebGL‑optimized JavaScript (Canvas 2D).

Historical note: Benoit Mandelbrot (1924–2010) first coined the term "fractal" and popularized this set in 1980. Today, it remains a centerpiece of computational mathematics and digital art.