# Z-fractal

## World's simplest fractal tool

This utility lets you draw custom and colorful Morton z-fractals. You can explore the fractal's behavior by recursively iterating it as many times as you want and changing its size in the options. You can also customize the thickness and color of the drawing pen, as well as adjust the color of the background. Fun fact – with each iteration, the number of z letters in the fractal quadruples. Fractabulous!

announcement
we've created devurls!

We just created another project – DEVURLS – world's simplest developer news aggragator. Check it out!

A link to this tool, including input, options and all chained tools.

Can't convert.

Z-fractal tool
What is a z-fractal?

This online browser-based tool allows you to create a custom Morton fractal. The Morton fractal, named after Guy Macdonald Morton (G.M.Morton), was first investigated in 1966. The Morton fractal is also called the z-fractal because it consists of a sequence of connected letters z, which fills the entire space. It's often used in data algorithms as it maps multidimensional data to one dimension while preserving locality of the data points. Ingenious and mind blowing at the same time, or as we love to say – fractabulous!

Z-fractal examples
Click to use

Four Iterations of Morton Fractal

In this example, we create a 4th-order z-order curve on a square canvas of 800x800 pixels. To do this, we use a 4-pixel pen and draw a white line on a catalino-blue background.

**Required options**

Iterate fractal this many times.

Fractal space width.

Fractal space height.

Pen width for drawing the
fractal's curve.

Pen color.

Fill fractal's background
with this color.

Indent around Morton's fractal.
(Adds this many empty pixels
to left, right, top, bottom sides.)

Norton's Fractal

In this example, we set the orientation for Morton fractal to vertical. As a result, all letters z are flipped on the side. This fractal is also called Norton fractal curve (a pun on Morton's name) because all z's are now n's.

**Required options**

Iterate fractal this many times.

Fractal space width.

Fractal space height.

Pen width for drawing the
fractal's curve.

Pen color.

Fill fractal's background
with this color.

Indent around Morton's fractal.
(Adds this many empty pixels
to left, right, top, bottom sides.)

Rectangular Morton Fractal

This example uses a rectangular space with a size of 800 by 1200 pixels to draw a z-order fractal. It calls the drawing algorithm recursively five times, which means there are 256 letters "z". (In general there are 4^(n-1) "z" letters for recursive depth "n".)

**Required options**

Iterate fractal this many times.

Fractal space width.

Fractal space height.

Pen width for drawing the
fractal's curve.

Pen color.

Fill fractal's background
with this color.

Indent around Morton's fractal.
(Adds this many empty pixels
to left, right, top, bottom sides.)

Pro tips
Master online fractal tools

You can pass options to this tool using their codes as query arguments and it will automatically compute output. To get the code of an option, just hover over its icon. Here's how to type it in your browser's address bar. Click to try!

https://onlinefractaltools.com/draw-morton-fractal?&iterations=4&width=800&height=800&line-width=4&line-segment-color=white&background-color=%23082585&padding=15&direction=horizontal

All fractal tools

Quickly draw a custom McWorter dendrite fractal.

Quickly draw a custom canopy tree fractal.

Quickly draw a custom Gosper fractal.

Quickly draw a custom Z-order fractal.

Quickly draw a custom Hilbert fractal.

Quickly draw a custom binary v-fractal.

Quickly draw a custom Peano fractal.

Quickly draw a custom Heighway dragon fractal.

Quickly draw a custom twin dragon Heighway fractal.

Quickly draw a custom Heighway nonadragon fractal.

Quickly draw a custom Koch fractal.

Quickly draw a custom Sierpinski triangle fractal.

Quickly draw a custom Sierpinski pentagon fractal.

Quickly draw a custom Sierpinski hexagon fractal.

Quickly draw a custom Sierpinski polygon fractal.

Quickly draw a custom Moore fractal.

Quickly draw a custom Cantor comb fractal.

Quickly draw a custom Cantor dust fractal.

Quickly draw a custom Levy fractal curve.

Quickly draw a custom ice fractal.

Quickly draw a custom t-square fractal.

Quickly draw a custom Hausdorff tree fractal.

Coming soon
These fractal tools are on the way

Generate a Hilbert Sequence

Walk the Hilbert fractal and enumerate its coordinates.

Generate a Peano Sequence

Walk the Peano fractal and enumerate its coordinates.

Generate a Moore Sequence

Walk the Moore fractal and enumerate its coordinates.

Generate a Cantor String

Encode the Cantor set as a string.

Mandelbrot Tree

Generate a Mandelbrot tree fractal.

Barnsey's Tree

Generate a Barnsley's tree fractal.

Barnsey's Fern

Generate a Barnsley's fern fractal.

Binary Fractal Tree

Generate a binary tree fractal.

Ternary Fractal Tree

Generate a ternary tree fractal.

Dragon Fractal Tree

Generate a dragon tree fractal.

De Rham Fractal

Generate a de Rham curve.

Takagi Fractal

Generate a Takagi-Landsberg fractal curve.

Peano Pentagon

Generate a Peano pentagon fractal curve.

Tridendrite Fractal

Generate a tridendrite fractal curve.

McWorter's Pentigree

Generate a Pentigree fractal curve.

McWorter's Lucky Seven

Generate a lucky seven fractal curve.

Eisenstein Fractions

Generate an Eisenstein fractions fractal curve.

Bagula Double V

Generate a Bagula double five fractal curve.

Julia Set

Generate a Julia fractal set.

Mandelbrot Set

Generate a Mandelbrot fractal set.

Toothpick Fractal

Generate a toothpick sequence fractal.

Ulam-Warburton Fractal

Generate an Ulam-Warburton fractal curve.

Subscribe!
Never miss an update

Cool!

Notifications
We'll let you know when we add this tool

Cool!