Generate a Gosper Curve
Draw a Peano-Gosper curve. Runs entirely in your browser, so your data never leaves your device.
Output
The result appears here as you type.
How to use Generate a Gosper Curve
- 1. Choose the iteration order. Set Iterations to control the curve's order. A 3rd-order curve already shows the hexagonal flowsnake shape clearly; higher orders fill the region with finer detail.
- 2. Size the canvas. Set Width (px) and Height (px) to fit the hexagonal region the curve fills. The Gosper curve grows on a 60-degree grid, so a roughly hexagonal aspect ratio suits it best.
- 3. Pick colors and line width. Choose Line color, Background color and Line width depending on whether you want individual turns visible or a smoother overall silhouette at a glance.
- 4. Review the rendered curve. The tool draws the flowsnake as a single continuous line on a 60-degree grid, filling a hexagonal snowflake-shaped region. Save the SVG once it looks right.
When to use Generate a Gosper Curve
Generate a Gosper Curve draws the Peano-Gosper curve, also known as the flowsnake, a space-filling curve that tiles a hexagonal region using 60-degree turns instead of the more common 90-degree grid. It is a standard example of a plane-filling curve built on a triangular lattice.
- Teaching space-filling curves beyond square grids. Most space-filling curve examples, like Hilbert or Peano, use square grids. The Gosper curve shows students the same idea works on a hexagonal lattice with 60-degree turns.
- Explaining flowsnake tiling in a geometry course. The Gosper curve's hexagonal footprint tiles the plane without gaps, making it a natural next topic after covering standard square-grid space-filling curves.
- Producing an unusual generative art base layer. The flowsnake's smooth, swirling hexagonal silhouette makes a distinctive background pattern for a poster or album cover, different from the sharper Koch or Sierpinski fractals.
- Illustrating fractal dimension calculations. The Gosper curve has a known fractal dimension used in coursework on measuring curve complexity; rendering it at a specific order gives students a concrete figure to reference.
Examples
A 3rd-order Gosper curve
Output
An SVG drawing of the flowsnake: a single line filling a hexagonal snowflake region on a 60-degree grid.
About the Generate a Gosper Curve tool
Generate a Gosper Curve is a free online tool that works entirely inside your web browser. Draw a Peano-Gosper curve. Because the processing happens on your own device, nothing you enter is uploaded, logged or stored anywhere.
This page is one of 234 Math utilities on EditSafely. Each one does a single job well, and all of them follow the same rule: your input stays on your machine.
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.
Because nothing leaves your device, the tool is suitable for sensitive content such as internal documents, credentials or customer data. It also responds instantly, since every keystroke is handled on your own machine rather than by a remote API.
Frequently asked questions
Is Generate a Gosper 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.