Ferramentas Guias
Fun Gratuito Sem cadastro

Fractal Generator

Interactive Mandelbrot and Julia set fractal explorer with pan, zoom, and color palettes.

Carregando ferramenta…

Sobre esta ferramenta

The Fractal Generator renders the Mandelbrot set and Julia sets directly in your browser using an HTML5 Canvas. Drag to pan across the complex plane and scroll to zoom into infinite levels of detail, revealing the self-similar structure of these famous mathematical objects. Five color palettes — Classic, Fire, Ocean, Grayscale, and Neon — map iteration counts to vivid color gradients. An iteration depth slider controls quality: lower values render faster, while higher values reveal sharper detail at deep zoom levels. Switch between the Mandelbrot set and Julia sets (with adjustable C parameter) with one click. Use the Reset button to return to the default view.

Como usar

  1. 1 The Mandelbrot set renders automatically when the page loads.
  2. 2 Scroll to zoom in or out; drag to pan.
  3. 3 Select a color palette from the palette buttons.
  4. 4 Adjust the iteration slider to trade speed for detail.
  5. 5 Click Julia Set and drag the C point to explore Julia sets.
  6. 6 Click Reset View to return to the default view.

What a fractal is, and what this tool draws

A fractal is a shape that contains endless detail: zoom in and you keep finding structure, often echoing the whole. This tool renders the two most famous fractals, the Mandelbrot set and the Julia sets, pixel by pixel on an HTML canvas in your browser. Both come from the same astonishingly simple rule applied to complex numbers — numbers of the form a + bi that live on a 2D plane. The image you see is a map of which points stay bounded under that rule and which fly off to infinity, colored by how quickly they escape.

The iteration formula

Every pixel is tested with the recurrence z → z² + c. Starting from some z, you square it and add a constant c, then repeat. The question is whether z stays small forever or grows without bound. In practice the tool watches the squared magnitude re² + im² and stops the moment it exceeds 4 (the standard escape radius), because once a point passes that threshold it is guaranteed to escape. The number of steps it took to escape — the iteration count — becomes the pixel's color.

ModeWhat varies per pixelWhat stays fixed
Mandelbrotc = the pixel's position; z starts at 0The starting z (always 0)
Juliaz = the pixel's positionc = the constant you set (e.g. -0.7 + 0.27i)

That single swap — whether the pixel coordinate plays the role of c or of the starting z — is the entire difference between the two fractals. Each Julia set corresponds to one value of c; change c and you get a completely different shape, which is why the tool gives you two number boxes to dial in its real and imaginary parts.

A worked example

Take the point c = 0 + 0i in Mandelbrot mode. Iterate: z goes 0 → 0² + 0 = 0 → 0 → … forever. It never escapes, so this point is in the set and is painted black. Now take c = 1 + 0i: z goes 0 → 1 → 1² + 1 = 2 → 2² + 1 = 5. The squared magnitude already exceeds 4, so it escaped after about 3 steps and gets a bright color from the low end of the palette. The intricate, colorful filaments you see at the boundary are points that take dozens or hundreds of iterations to decide — the closer to the edge, the longer they hesitate, which is why the boundary is where all the visual richness lives.

The controls and what they change

  • Iterations (64–512). The cutoff for "this point never escapes." Higher values resolve finer detail near the boundary but take longer to compute, because every pixel may loop up to that many times. At deep zoom you need more iterations to keep the edge sharp.
  • Pan and zoom. Drag to move across the complex plane; scroll (or pinch on touch) to zoom. The tool zooms toward the point under your cursor by recomputing the world coordinate there and keeping it fixed, so you dive into exactly the spot you aimed at.
  • Palettes. Classic, Fire, Ocean, Grayscale, and Neon each map the iteration count to color differently — Grayscale is linear brightness, Neon cycles hue by iteration for a banded rainbow, and Classic uses a smooth polynomial blend. Points inside the set are always black.
  • Mandelbrot / Julia toggle and Reset. Switch fractal type instantly; Reset returns to the default view centred at -0.5 + 0i spanning 3.2 units.

Tips for finding striking images

  • Hunt the boundary. The black interior and the far exterior are visually plain. All the beauty is on the fractal's edge — zoom into the wispy filaments between black and color.
  • Raise iterations as you zoom. A view that looks crisp at low zoom turns muddy deep in. Push iterations toward 512 when detail blurs, then back off if rendering feels slow.
  • Explore Julia by nudging c. Small changes to the c parameter (try values near the Mandelbrot boundary, like -0.8 + 0.156i) produce dramatically different Julia shapes — connected blobs versus scattered "dust."
  • Mind floating-point limits. Standard JavaScript numbers run out of precision at extreme zoom, so eventually deep dives turn blocky. That is a property of the arithmetic, not a bug.

How it performs

Rendering is pure computation: for a canvas of W × H pixels at N iterations, the worst case is about W × H × N arithmetic steps, all run on your CPU and written straight to the canvas image buffer. That is why large canvases at maximum iterations pause briefly while drawing. Everything happens locally in your browser — no server renders the image, and nothing about where you zoom is ever sent anywhere.

Perguntas frequentes

{# Alpine.js — self-hosted. (The previous jsdelivr CDN tag had a stale SRI integrity hash, so the browser refused to run it and window.Alpine was never defined — silently breaking every FAQ accordion and Alpine tool.) #}