EditSafely

Generate a Moore Curve

Draw a Moore space-filling curve. Runs entirely in your browser, so your data never leaves your device.

Output

The result appears here as you type.

Options

How to use Generate a Moore Curve

  1. 1. Choose the iteration count. Set Iterations to pick the grid size the curve fills. A 4-iteration Moore curve fills a moderate square grid and returns exactly to its starting point.
  2. 2. Size the canvas. Set Width (px) and Height (px) to fit the square grid the curve traverses, keeping the canvas roughly square since the loop closes back on itself.
  3. 3. Pick colors and line width. Choose Line color, Background color and Line width depending on whether you want the closed loop's path traceable or just the overall filled shape visible.
  4. 4. Review the rendered curve. The tool draws a closed-loop, Hilbert-style line that fills a square grid and returns to its starting point, rendered as an SVG. Save it once the fill pattern looks right.

When to use Generate a Moore Curve

Generate a Moore Curve draws a variant of the Hilbert curve that forms a closed loop, ending exactly where it started rather than at a different corner. It is used wherever a space-filling curve needs to return to its origin, such as certain scanning or tour-planning problems.

  • Teaching the Hilbert curve's closed-loop variant. After covering the standard Hilbert curve, showing the Moore curve highlights how a small change to the construction produces a curve that closes into a loop instead of ending at a different point.
  • Explaining closed-tour space-filling applications. Some scanning or plotting applications need a path that visits every cell and returns to the start, similar in spirit to a traveling salesman tour, and the Moore curve is a natural fit to reference.
  • Comparing open versus closed space-filling curves. Render the Hilbert curve and Moore curve at matching iteration counts side by side to show the visual difference between an open path and a closed loop.
  • Producing a figure for a computer graphics course. A lecture on locality-preserving curves used in texture mapping or mesh traversal can use the Moore curve as an example of a self-closing space-filling path.

Examples

A 4-iteration Moore curve

Output

An SVG drawing of a closed-loop Hilbert-style line that fills a square grid and returns to its start.

About the Generate a Moore Curve tool

Generate a Moore Curve does its work locally, right in the browser. Draw a Moore space-filling curve. There is no upload step, no queue and no account, and your data never travels over the network.

It belongs to the Math Tools collection on EditSafely, a set of 234 small, focused Math utilities that share the same instant, private workspace.

You can shape the output with 6 settings, including Iterations, Width (px), Height (px) and Line color, and the result refreshes the moment you change one. A worked example further down the page shows exactly what the tool produces for a real input.

Running locally also makes the tool fast and dependable: results appear as you type or drop a file, there is no server outage that can take it down mid-task, and confidential data can be processed without a second thought.

Frequently asked questions

Is Generate a Moore Curve free to use?

Yes, it is completely free. All 2,658 tools on EditSafely work without an account, a subscription or usage limits.

Does the generator send anything to a server?

Everything happens locally. Your browser downloads the tool's code once, then does all the processing itself; nothing you enter is transmitted, stored or logged. You can even go offline after the page loads and it will still work.

How do I get a different result?

Run the generator again. Each run is computed fresh on your device, and any options you change are applied to the next result immediately.

Do I need to sign up or install anything?

No. The tool works in any modern browser on desktop, tablet or phone. There is no account to create, no extension to add and no software to install.

Can I save what the tool produces?

Yes. Use the download or copy controls in the output panel to keep the rendered result once it looks the way you want.

Related tools

All Math Tools