Dragon Curve

Watch a fractal fold itself into being

12
4,096 segments2^12
Scrub100.0%
450 ms / fold

full sequence ≈ 5.40s

1.5px

drag to pan · scroll to zoom · double-click resets

4,096 segments
zoom 100%

Technical Readout

Live values driving the fold animation. Updates every frame.

Animation timing

idle
Stage
11 / 12
Displayed iterations
12.000
Speed
450 ms / fold
Total duration
5.40 s
Overall progress100.0%
Within current fold (t)100.0%

Easing function

easeInOutCubic

f(t) = t<0.5 ? 4t³ : 1 - (-2t+2)³/2

Smooth acceleration into the fold and decel. on the way out.

t (raw)
1.000
f(t) eased
1.000

Active transformation

Each new point p' is rotated around the pivot by the current fold angle:

p' = R(θ) · (p − pivot) + pivot

θ =-90.00°(-1.571 rad)
[
0.0001.000-1.0000.000
]
pivot.x
-32.00
pivot.y
32.00

Geometry

Segmentsbase 2^11 = 2,048 + folded copy
4,096
Curve length
4,096 u
Bounding boxaspect 1.508
95.0 × 63.0
Vertices
4,097

Convergence to a line

Diverging from line

Straightness S = ‖end − start‖ / L. Closed form for the Dragon Curve: S(n) = (1/√2)ⁿ. Convergence criterion: S ≥ 0.999. Analysis frame is capped at N_max = 100 iterations.

0.000.250.500.751.00
space-fillingstraight
Live S
1.563e-2
Predicted S(n)n = 12.00 · (1/√2)^n
1.563e-2
Displacement
64.00
Length L
4096.00
Total turningclosed form 90°·(2^n − 1)
368550.0°
CapS(100) = 8.88e-16
n ≤ 100
S(n) over n ∈ [0, 100]log scale
10^010^-410^-810^-1210^-160255075100

Iterations to drop below threshold

S < 0.5n ≥ 2
S < 0.1n ≥ 7
S < 0.01n ≥ 14
S < 10^-3n ≥ 20
S < 10^-6n ≥ 40
S < 10^-15n ≥ 100

Derived from (1/√2)ⁿ < τ ⇔ n > −2·log₂(τ).

Hall of records

5 / 9

Latest: “Recognizable dragon” at n = 10. Next: “A dragon” at n = 14.

  • ✓
    First creasen = 1
    One fold. Still mostly straight.
  • ✓
    L-bendn = 2
    S drops below 0.5. (τ = 0.5)
  • ✓
    Curling upn = 4
    Sixteen segments. Shape emerging.
  • ✓
    Decisively coiledn = 7
    S drops below 0.1. (τ = 0.1)
  • ✓
    Recognizable dragonn = 10
    1,024 segments. Unmistakable silhouette.
  • ·
    A dragonn = 14
    S drops below 0.01. (τ = 0.01)
  • ·
    Space-filler in trainingn = 20
    S drops below 10⁻³. (τ = 10^-3)
  • ·
    Beyond sightn = 40
    S drops below 10⁻⁶. (τ = 10^-6)
  • ·
    Numerical zeron = 100
    Past double-precision epsilon. (τ = 10^-15)

Target iterations for straight-line state

n = 0 only. Unreachable for 1 ≤ n ≤ 100.

Each fold injects 2ⁿ − 1 fixed 90° turns. The summability test Σ 2ⁿ·θₙ < ∞ fails for constant θₙ = 90°, so straightness decays geometrically and cannot recover within the 100-iteration cap.

Variable sensitivity

  • n — only lever; S decays as 2^(−n/2). Monotonic, one-way.
  • ℓ (segment length) — uniform scale; cancels in ‖Δ‖/L. No effect on n.
  • θ₀ (initial heading) — rigid rotation; geometry-invariant. No effect on n.
  • t, easing, speed — re-time the fold but never alter integer-iteration geometry. No effect on n.
  • stroke, palette, mode — render only. No effect on n.

Underlying math

RecurrenceDn+1 = Dn ∪ R−π/2, p(Dn)
Segment count|Dn| = 2n
Bounding ratio / step≈ √2 per iteration
Hausdorff dimdimH(boundary) ≈ 1.5236
Tiling factFour dragons tile the plane around their shared start point.