🔍 2D Fractal Explorer — Mandelbrot & Julia
A real per-pixel Mandelbrot and Julia set explorer running on a 2D canvas. Zoom recomputes every pixel at full precision, drag to pan, and drag directly on the canvas to sculpt the Julia parameter live.
About this simulation
This explorer renders the Mandelbrot set and Julia sets using a plain 2D canvas — every pixel is mapped to a point on the complex plane and iterated in ordinary JavaScript through z = z² + c, with no shader involved. Zooming genuinely recomputes the image at the new scale rather than stretching a cached bitmap, so panning and zooming keep revealing fresh detail. In Julia mode you can drag directly on the canvas to sculpt the fixed parameter c and watch the whole set reshape in real time.
🔬 What It Demonstrates
The escape-time algorithm computed by hand, pixel by pixel, on the CPU: does z = z² + c diverge from a given starting point? A point is treated as escaped once x² + y² exceeds 4, and a smooth log-log iteration count avoids visible colour banding.
🎮 How to Use
Pick Mandelbrot or Julia mode and a palette, then drag to pan and scroll or double-click to zoom. In Julia mode, move Re(c)/Im(c) or tick "Drag canvas to set c" to control the parameter with the mouse directly. Zoom targets jump to famous Mandelbrot landmarks.
💡 Did You Know?
Because this version uses plain 64-bit floating point instead of a GPU shader, it can hold precision a little longer at extreme zoom before rounding noise breaks up the boundary's finest filaments.
Frequently asked questions
How is this different from the 3D shader version of the Fractal Explorer?
Both compute the same escape-time algorithm, but this one runs entirely in JavaScript on a flat 2D canvas using putImageData, while the other renders through a GLSL fragment shader inside a Three.js scene. This version is slower per pixel but easier to inspect and modify, and it recomputes the exact same z = z² + c iteration by hand rather than on the GPU.
Why does the image look blocky while I'm dragging?
To stay responsive, the renderer samples a coarser grid of pixels while you're actively panning or zooming, then fills in the full-resolution pass a fraction of a second after you stop. This keeps the interaction smooth even though every pixel is genuinely iterated in JavaScript rather than drawn from a pre-rendered texture.
What does "Drag canvas to set c" do?
With that box ticked and Julia mode selected, dragging anywhere on the canvas maps your cursor position directly onto the complex plane and uses that point as the Julia constant c, live-updating the sliders and the fractal as you move. It is a direct, exploratory way to browse the whole family of Julia sets instead of typing numbers.
Is the fractal mathematically accurate?
Yes — every pixel undergoes the real iteration z = z² + c with the standard escape radius test, computed with standard double-precision numbers. The smooth colouring is purely a display technique; it does not change which points are treated as escaping.
Why do deep zooms eventually look pixelated or noisy?
Double-precision JavaScript numbers carry roughly 15-17 significant decimal digits. Past a few million times zoom, the difference between neighbouring pixels' coordinates becomes smaller than that precision can represent, so the escape-time calculation starts producing rounding artefacts instead of genuine structure.
A genuine per-pixel Mandelbrot and Julia set explorer running on a plain 2D canvas — no shader, no cached image. Zoom in and every pixel is iterated again from scratch.
🔬 What It Demonstrates
Each pixel is tested by hand in JavaScript: does z = z² + c diverge? The escape speed determines the colour. Julia mode fixes c and varies the starting point, and you can drag on the canvas to move c live.
🎮 How to Use
Drag to pan, scroll or double-click to zoom. Switch between Mandelbrot and Julia modes, tune iterations and palette, and tick "Drag canvas to set c" to sculpt the Julia parameter with the mouse.
💡 Did You Know?
Because this renderer works in plain double-precision JavaScript instead of GPU shader floats, it can hold up a little longer at extreme zoom before rounding noise takes over — though eventually both hit the same wall.
A genuine per-pixel Mandelbrot and Julia set explorer on a plain 2D canvas: zoom recomputes every pixel's escape-time value at the new scale rather than scaling a bitmap, and dragging on the canvas in Julia mode sculpts the fixed parameter c live.
2D · HTML5 Canvas 2D · 60 FPS target · runs fully client-side, no install