Fractal Generator Math

Mandelbrot Set | Zoom: 1x
100

Click and drag on the canvas to select a region to zoom into. Reset to start over.

What is a Fractal Generator?

Quick Answer: An interactive tool that draws famous fractals: the Mandelbrot set (infinite complexity from a simple formula), the Sierpinski triangle (a self‑similar triangle pattern), and the Koch snowflake (a curve with infinite perimeter). Adjust parameters and zoom to explore infinite detail.

Theory of Fractals

Fractals are geometric shapes that exhibit self‑similarity at different scales. The Mandelbrot set is defined by the iteration zn+1 = zn2 + c, where c is a complex number. Points for which the sequence remains bounded are colored black (inside the set); others are colored by how quickly they escape. The Sierpinski triangle is generated by repeatedly removing the central inverted triangle from an equilateral triangle. The Koch snowflake starts with an equilateral triangle; each side is recursively replaced by four smaller segments, creating a shape with finite area but infinite perimeter.

Step-by-Step Examples

Example 1: Explore the Mandelbrot Boundary

  1. Select "Mandelbrot Set". Click and drag a small rectangle over a border area.
  2. The canvas zooms into that region. Increase max iterations (e.g., 300) to reveal finer details.
  3. Reset Zoom to return to the full set.

Example 2: Build a Sierpinski Triangle

  1. Switch to "Sierpinski Triangle". Use the depth slider: 0 = filled triangle, 1 = 3 triangles, 2 = 9, etc.
  2. Observe how each level removes the center triangle from the previous ones.

Example 3: Watch the Koch Snowflake Grow

  1. Choose "Koch Snowflake". Start with iterations = 0 (plain triangle), then increase to 3 or 4.
  2. Notice the perimeter becomes increasingly jagged, approaching the theoretical Koch curve.

Frequently Asked Questions

What is the Mandelbrot set?

It's the set of complex numbers c for which the sequence zn+1 = zn2 + c stays bounded. The black region is the set; the colorful halo shows escape speeds.

Why does zooming on the Mandelbrot set reveal more detail?

The boundary is infinitely complex; no matter how much you zoom in, you'll see new patterns because the fractal is self‑similar but never exactly repeating.

What does depth mean for Sierpinski?

It's the number of recursive iterations. Each step splits every filled triangle into 3 smaller copies.

How is the Koch snowflake drawn?

Starting from a line segment, each segment is replaced by four segments in a _/\_ pattern. After enough iterations, it looks like a snowflake.

Can I save the fractal image?

Right‑click on the canvas and choose "Save Image As…". The current view will be saved as a PNG.