Fractals are a set of complex, self-similar, organically beautiful structures described by certain mathematical functions. Images of fractals are generated by iterative algorithms, many of which are very simple. By starting with a small pattern, applying a simple transformation, applying the same transformation to the result, and repeating, one can quickly construct elaborate fractals with only a pen and squared paper (and no need for a calculator). In this post, I demonstrate how to build nine well-known fractals in MS Paint.

Tip: use transparent selections and shift-click to place a floating shape in position without losing the selection.

1.      Vicsek fractal (wikipedia)

The outline of this simple fractal, also known as a box fractal, is a Type 1 quadratic Koch curve. In MS Paint, the initial element is a single pixel. Each new generation is formed by copying the previous generation and pasting it in a + (or ×) around itself, forming a cross of ever-increasing size and intricacy.

 2.      Sierpinski triangle (wikipedia)

The famous Sierpinski triangle also begins with a single pixel. Subsequent generations are arranged in an L- or Λ-shaped triangle. In the Λ-shaped case illustrated, I have filled in the one-pixel gap at the bottom in each generation (shown in green). This operation is not required in the L-shaped case.

3.      Sierpinksi carpet (wikipedia)

Each generation of the Sierpinski carpet contains nine copies of the previous generation arranged in a hollow square.

4.      Sierpinski hexagon/Koch snowflake/Koch curve (wikipedia)

The Sierpinski hexagon is composed of hollow hexagons arrayed in larger hollow hexagons as shown. For this version, I prefer to separate the left and right halves of each generation by a one-pixel bridge (shown in green); this ensures the regularity of the hexagons, which otherwise appear slightly squashed.  If one uses a filled-in hexagon and places one in the middle of each generation, the resulting fractal is called a hexaflake. The snowflake filled black in the illustration is called a Koch snowflake; its outline is a Koch curve.

5.      Gosper Island (wikipedia)

Gosper Island can be constructed by tessellating hexagonal tiles as shown. In this case, I’ve started with quite a large tile; smaller hexagons (like those used for the Sierpinski hexagon) also work but with more distorted results. One could build hollow hexagons instead of filled ones; the result would resemble a Sierpinski carpet.

The remaining four fractals are all slightly trickier: they involve a rotation step.

6.      Fibonacci word fractal

This is a variant of what the internet calls the Fibonacci Word fractal; apparently it has interesting connections with the Fibonacci sequence. It is formed by the outline of squares placed at the corners of larger squares, ad infinitum. Each generation must be copied and rotated several times to build the next.

7.      Lévy C curve (wikipedia)

The Lévy C curve begins with a simple Π-shape (upside-down here), which is rotated through 90 degrees and overlapped with itself. This procedure is repeated, building up a shape whose outer surface is formed of straight lines with the angles of a regular octagon. When the generations overlap correctly (as shown), the loops formed by their intersections will resemble earlier steps in the iteration (an example is highlighted in the purple square).

8.      Minkowski sausage (wikipedia)

The Minkowski sausage (more prosaically known as the quadratic type 2 Koch curve) is an S-shaped chain of smaller S-shapes. Each generation contains eight copies of the previous generation, rotated and copied as shown.)

9.      Dragon curve (wikipedia)

Each generation of the dragon is formed by copying the previous generation, rotating it 90 degrees, and pasting it next to the original so that the “hooks” overlap as shown (after step three, the hook at the end of each new generation will be a Π-shape, and should be placed over the [-shape at the top of the previous generation). In this version, I overlap the generations so that the lines of the dragon fall on a 3 x 3 grid. I have filled in the squares of the large dragon.

2 thoughts on “Making fractals in MS Paint

  1. These are awesome.

    For some reason, when I think of fractals, I always think of starting big and zooming inwards, but actually it makes a lot more sense to construct them by the smallest element working outwards; it means the ‘infiniteness’ of the pattern is only seen when the whole image is infinitely large, though…

    1. Thanks, Andy! One thing I do like about this bottom-up approach is that it shows why fractals appear in physical systems! Unexpected patterns emerge out of nowhere from combinations of simple building blocks, just as with cellular automata.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s