loading...
running...
How to use
Pick a preset or choose the set, exponent and iteration limit. Use the centre and zoom sliders to navigate, drag to orbit the camera, click the relief to pick a point and watch the marble hop along its orbit. In Mandelbrot mode, "Make Julia" turns the picked c into a Julia set. Raise the iteration limit when deep zooms go black. Space is unused, R resets the view.
The plinth, frame, lamps, marble, plaque and textures were modelled and baked in Blender; Three.js r160 displaces the mesh from the same iteration code as the 2D page.
The science
Escape-time fractals iterate a map on the complex plane and colour each starting point by how fast the orbit leaves. For the Mandelbrot set the map is z → zp + c with z0 = 0, and the pixel is the parameter c; the set is the set of c for which the orbit stays bounded. For a Julia set c is fixed and the pixel is z0. The Burning Ship replaces z by (|Re z| + i|Im z|) before squaring. If |z| ever exceeds 2 (for p = 2, c small) the orbit must escape to infinity, so the iteration limit only matters for points that stay bounded for a long time.
Smooth colouring. The raw escape count n is an integer, which makes visible bands. Since |z| grows roughly like |z0|^(p^n) near escape, nu = n + 1 - log(log|z|) / log p is a continuous version of the count; the palette is a function of log(1 + nu), so colours vary smoothly. A bailout radius of 256 is used for this (not 2), which makes the correction accurate.
Facts used in the checks. (1) The area of the Mandelbrot set is about 1.50659 (the best known estimates come from rigorous bounds plus large-scale computation); a 900 x 460 grid estimate agrees to better than 1%. (2) Just right of the cusp c = 1/4 the orbit squeezes through a narrow channel: for c = 1/4 + eps the escape count times sqrt(eps) tends to pi (Klebanoff, 2001). (3) Every c on the main cardioid, c = mu/2 - mu²/4 with |mu| < 1, has an attracting fixed point, and every c with |c + 1| < 1/4 an attracting 2-cycle; both regions are tested without the shortcut. (4) For c = -1 the orbit is exactly 0, -1, 0, -1, ... (5) The smooth value changes by less than 0.001 per 1e-5 step in the exterior.
Speed-up and limits. For p = 2 the renderer skips the cardioid and period-2 bulb by their closed forms, which are always interior. Everything is IEEE double precision: below a view height of about 1e-13 pixels merge and the picture turns blocky (the zoom slider stops at 10^4.2 where that is not an issue). The iteration limit decides which boundary points look "interior": the interior-percentage graph shows how the estimate settles as the limit grows. The 3D page uses the same function sampled on a grid.
Orbit of the picked point. The white polyline is z0, z1, z2, ... for the point you clicked: bounded orbits spiral toward an attracting cycle, escaping orbits fly off; the |z_n| graph shows when the orbit crosses |z| = 2.
Relief. Height is (log(1+nu) / log(1+limit))^1.6, capped, so the mountains rise toward the set boundary where orbits take longest to escape; the interior, which never escapes, is a flat pit. The height is a visual choice, not a physical quantity. Click the relief to pick a point; the marble hops along its orbit.