onlinefractaltools logo

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. A curious fact – with each iteration, the number of z letters in the fractal quadruples. Fractabulous!
love numbers? check out number tools!
We also have Online Number Tools — utilities for doing numbery things. Check it out!
Iterations and Area
Iterate fractal this many times.
Fractal space width.
Fractal space height.
Thickness and Colors
Pen width for drawing the fractal's curve.
Pen color.
Fill fractal's background with this color.
Indents and Orientation
Indent around Morton's fractal. (Adds this many empty pixels to left, right, top, bottom sides.)
Morton fractal's orientation.
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.
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
These options will be used automatically if you select this example.
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.)
Morton fractal's orientation.
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.
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
These options will be used automatically if you select this example.
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.)
Morton fractal's orientation.
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".)
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
These options will be used automatically if you select this example.
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.)
Morton fractal's orientation.
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
Didn't find the tool you were looking for? Let us know what tool we are missing and we'll build it!
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 Hausdorff tree fractal.
Quickly draw a custom Moore fractal.
Coming soon These fractal tools are on the way
Fractal Canopy
Generate a fractal tree canopy.
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.