Buddhabrot Fractal
Generate and explore Buddhabrot fractal renderings with adjustable iterations, samples, exposure, and Nebulabrot RGB compositing in real time.
About
The Buddhabrot is a rendering technique for the Mandelbrot set discovered by Melinda Green in 1993. Unlike standard escape-time coloring, it constructs a probability density map by tracing the full orbital paths of escaping points c under iteration zn+1 = zn2 + c. Each pixel accumulates visit counts across millions of random samples. The resulting histogram reveals intricate structures invisible to conventional Mandelbrot plots. Low iteration limits expose broad diffuse forms; high limits resolve fine filamentary detail near the set boundary. Misconfiguring the sample count or exposure produces either noise or a washed-out image. This tool performs the full stochastic computation in a background thread and applies logarithmic tone mapping for correct dynamic range compression.
The Nebulabrot variant assigns separate maximum iteration depths to the red, green, and blue channels, producing false-color composites that encode structural information across multiple scales simultaneously. Typical channel assignments use ratios near 500 / 5000 / 50000 iterations. The tool approximates results assuming uniform random sampling over the bounding rectangle [β2, 1] Γ [β1.5, 1.5]. Sampling efficiency drops for very high iteration thresholds because fewer orbits escape. Pro tip: increase sample count proportionally when raising iteration limits beyond 10000.
Formulas
The Buddhabrot histogram is constructed by sampling random points c = cre + i cim from the complex plane and iterating the Mandelbrot recurrence:
If the orbit escapes (|zn| > 2) before reaching the maximum iteration count N, every point zk in the orbit is mapped to pixel coordinates and the histogram bin H[x, y] is incremented:
Pixel coordinates are computed from the complex value via linear mapping:
The final image brightness is derived via logarithmic tone mapping with an exposure parameter E:
Where Hmax is the maximum bin count across the entire histogram, W is canvas width in pixels, N is max iteration count, E is the exposure multiplier, and Ξ΄ is the Kronecker delta selecting the target bin. For the Nebulabrot, three independent histograms HR, HG, HB are computed using distinct max iteration values NR < NG < NB and composited into an RGB image.
Reference Data
| Parameter | Low Detail | Medium Detail | High Detail | Ultra Detail | Effect |
|---|---|---|---|---|---|
| Max Iterations | 100 | 1000 | 5000 | 50000 | Higher reveals finer filaments near set boundary |
| Samples (millions) | 1M | 10M | 50M | 200M | More samples reduce noise and fill gaps |
| Escape Radius | 2.0 (standard) | Values > 2 capture longer orbit tails | |||
| Resolution | 400Γ400 | 800Γ800 | 1200Γ1200 | 2000Γ2000 | Larger canvas resolves more spatial detail |
| Exposure (log) | 0.5 | 1.0 | 1.5 | 2.0 | Controls brightness mapping of histogram |
| Nebulabrot Red | 100 | 500 | 1000 | 5000 | Broad diffuse structures |
| Nebulabrot Green | 500 | 5000 | 10000 | 50000 | Intermediate filament detail |
| Nebulabrot Blue | 2000 | 50000 | 100000 | 500000 | Fine boundary detail |
| Anti-Buddhabrot | Uses non-escaping orbits | Renders interior density (complement of Buddhabrot) | |||
| Sampling Region Re | [β2.0, 1.0] | Real axis bounds of random c | |||
| Sampling Region Im | [β1.5, 1.5] | Imaginary axis bounds of random c | |||
| Escape Rate (approx.) | 80% | 30% | 12% | 3% | Fraction of samples contributing to histogram |
| Tone Mapping | Logarithmic: log(1 + h) | Compresses high dynamic range of histogram | |||
| PRNG | xorshift128 | Fast deterministic pseudorandom number generator | |||
| Symmetry | Vertical (imaginary axis) | Buddhabrot is symmetric about Im = 0 | |||