Heighway Triangle Generator

Generate and visualize the recursive Heighway Dragon curve and right-triangle subdivisions with animations and color themes.

Presets

Quick-load beautiful designs

Fractal Geometry

Parameters and depths

Aesthetics & Colors

Colors, strokes and canvas backgrounds

Animation controls

Trace and watch curves generate

Zoom: 100%
Binary DragonDepth: 10
Line Segments1,024
Total Triangles1,024
Curve Length32.0 px
Boundary D1.5236

How to Navigate the Viewport

Click and drag your mouse on the canvas area to pan around the fractal curve. Use your scroll wheel (mouse scroll) or pinch gestures on trackpads to zoom in and out. If the fractal goes out of view, click the Recenter button at the top left of the viewport bar to return to default scale bounds.

Professional Heighway Triangle Generator for Everyone

An interactive visualizer for the Heighway Dragon curve and its underlying right-triangle subdivisions (Heighway Island). Construct the fractal recursively step-by-step using line drawings or filled meshes. Learn about boundary Hausdorff dimensions, area convergence, and ternary variations like the 120° Terdragon. Supports custom line thicknesses, color styles, speed animations, and SVG/PNG exports.

Recursive Construction: Toggle depths up to 14 for the binary dragon and 9 for the terdragon
Subdivision Modes: Visualize via Line Stroke, Filled Triangle Mesh, or Both side-by-side
Ternary Terdragon Curve: Switch to the 120-degree fractal path to compare geometries
Interactive Canvas: Real-time panning and zoom with scroll and drag controls
Animated Draw Progress: Animate the recursive steps sequentially with play and speed settings
Custom Styling: Choose solid, linear gradient, and spectral rainbow color themes
Mathematical Metrics: Live calculations of drawn segments, triangles, bounds, and boundary dimension D
Lossless Quality Exports: Save viewports directly as transparent PNGs or copy vector SVG code

Key Benefits

Why choose our Heighway Triangle Generator for your workflow?

Visual Intuition: See the connection between triangle divisions and the resulting boundary curve.

High Performance: Uses optimized HTML5 canvas operations to prevent UI thread lag at high depths.

Academic-Ready: Review precise fractal statistics and download scalable vector SVG coordinates.

Completely Local: No server uploads needed; all math and artwork are compiled in-browser.

Common Use Cases

Real-world examples of how to use this tool.

Educational Demos: Teach self-similarity, geometric recursion, and fractal dimensions.

Artistic Creations: Design complex geometric patterns, logo silhouettes, or tech background prints.

Math Exploration: Investigate how space-filling boundaries overlap or tessellate with adjacent dragons.

Coding Benchmarks: Test recursive algorithms and interactive HTML5 canvas rendering limits.

How to use Heighway Triangle Generator?

Follow these simple steps to get the best results.

Step 1

Select a preset (Classic Dragon, Filled Heighway Island, Terdragon Curve) from the options panel.

Step 2

Adjust the Recursion Depth slider to control detail density.

Step 3

Choose a Rendering Mode (Line Stroke, Triangle Mesh, or both) and customize line thickness or colors.

Step 4

Drag the viewport to pan, or use the scroll wheel to zoom into details.

Step 5

Press the Play button to animate the fractal generation segment by segment.

Step 6

Download your completed fractal artwork using the PNG download or copy the raw SVG vector code.

Frequently Asked Questions

Common questions about our Heighway Triangle Generator tool.

What is the Heighway Dragon?

The Heighway Dragon (also known as the Harter-Heighway dragon) is a famous self-similar fractal curve first investigated by NASA physicists John Heighway, Bruce Harter, and William Harter in 1966. It is generated by starting with a line segment and recursively replacing it with two segments meeting at a right angle.

What is the 'Heighway Triangle' subdivision?

The Dragon curve can be viewed as the boundary of a union of isosceles right triangles. By recursively dividing an initial right-isosceles triangle into two smaller right-isosceles triangles, we obtain a tiled shape known as the Heighway Island. The boundary of this tiled mesh converges to the Heighway Dragon curve.

What is the Terdragon curve?

The Terdragon curve is a closely related ternary fractal. Instead of folding at 90 degrees (binary), each segment is replaced by three segments forming 120-degree turns (ternary). It is a space-filling curve with a boundary Hausdorff dimension of 2.

Why are the depth limits set to 14 for Dragon and 9 for Terdragon?

At depth 14, the binary dragon draws 2^14 = 16,384 segments/triangles. At depth 9, the terdragon draws 3^9 = 19,683 segments. Going higher increases segment counts exponentially, which can freeze the browser's UI rendering thread. We cap these levels to maintain a smooth 60 FPS experience.

Can these dragons tile the plane?

Yes! The Heighway Dragon can tile the 2D plane in infinitely many ways. Multiple dragon shapes fit together perfectly without overlapping, similar to puzzle pieces, forming a clean tessellation.

Discover More Tools

Hand-picked utilities to speed up your workflow.

Explore All Tools

Expert Insights

Learn more about privacy, image processing, and modern design.

Read Our Blog