Lab › Geometry of Seeing › Part 2 of 4 · start at Part 1

Euler's Elastica and Jacobi Elliptic Functions

The Pontryagin Maximum Principle turns the SE(2) geodesic problem into a pendulum ODE. Its solutions are the three families of Euler's elastica, parametrised exactly by Jacobi's elliptic functions sn, cn, dn — and their spatial period is 4K(k²), the complete elliptic integral of the first kind.

By Igor Moiseev · 28 April 2026 · arXiv:0807.4731 · with Yu. L. Sachkov
Geometry of Seeing
  1. The Visual Cortex as a Contact Manifold
  2. Euler's Elastica and Jacobi Elliptic Functions ← you are here
  3. Maxwell Strata: When Optimal Paths Fork
  4. The Exact Cut Time on SE(2) — and the Open Problem Beyond It
Appendices — theory background (5)
  1. A1. Lie Groups, Lie Algebras, and the Exponential Map of SE(2)
  2. A2. Distributions, Frobenius, and Contact Geometry
  3. A3. Calculus of Variations and the Pontryagin Maximum Principle
  4. A4. Jacobi Elliptic Functions, Elliptic Integrals, and the AGM
  5. A5. The Sub-Riemannian Exponential Map of SE(2)
What this article covers
We derive, from first principles via the Pontryagin Maximum Principle, the pendulum equation that governs every extremal of the $\mathrm{SE}(2)$ problem — and from it the closed-form curvature of the smooth completion curves, Euler's elastica (the free SR geodesics share the same pendulum but project to cuspidal curves; both are developed below). The key formula: for the inflectional family, $$\kappa(s) = 2k\,\mathrm{cn}(s \mid k^{2}),$$ and the spatial period of the curvature oscillation is exactly $T_{\kappa} = 4K(k^{2})$, the complete elliptic integral of the first kind. All three families are interactive in the figures below.

Hamiltonian Formulation via the PMP

Recall from Part 1 that we want to minimise arc length among horizontal curves in $\mathrm{SE}(2)$:

\[\min \int_0^T \sqrt{u_1^2 + u_2^2}\,dt, \qquad \dot g = u_1 X_1(g) + u_2 X_2(g).\]

We use the standard normalisation $u_1^2 + u_2^2 = 1$ (unit-speed parametrisation), which reduces the problem to minimising $T$ — the total arc length.

The Pontryagin Maximum Principle (PMP) introduces a covector $\lambda$ in the cotangent bundle, evolving alongside the state:

\[\lambda \in T^{*}_{g}\,\mathrm{SE}(2).\]

In the left-trivialisation provided by the Lie algebra,

\[T^{*}\mathrm{SE}(2) \;\cong\; \mathrm{SE}(2) \times \mathfrak{se}(2)^{*},\]

the costate becomes a triple of components $(h_1, h_2, h_3)$ defined by

\[h_i = \langle \lambda,\, X_i(g)\rangle, \qquad i = 1, 2, 3.\]

The Hamiltonian for the PMP maximisation condition is

\[H = h_1 u_1 + h_2 u_2 - \nu \sqrt{u_1^2 + u_2^2},\]

where $\nu \in {0, 1}$ is the abnormality constant ($\nu = 1$ for normal extremals, $\nu = 0$ for abnormal; Appendix A3 carries out the maximisation in full). Minimising length is equivalent to minimising the energy $\tfrac12!\int(u_1^2 + u_2^2)\,dt$ over a fixed interval (Cauchy–Schwarz), and for normal extremals the PMP maximisation then delivers the normal (sub-Riemannian) Hamiltonian

\[\mathcal{H}_n = \tfrac{1}{2}\bigl(h_1^2 + h_2^2\bigr).\]

The Hamiltonian equations on $\mathfrak{se}(2)^{*}$, via the Lie–Poisson bracket, read

\[\dot h_1 = \{h_1, \mathcal{H}_n\} = h_2 h_3, \quad \dot h_2 = \{h_2, \mathcal{H}_n\} = -h_1 h_3, \quad \dot h_3 = \{h_3, \mathcal{H}_n\} = -h_1 h_2.\]

Two integrals reduce this 3D system to a 1D motion. The Hamiltonian itself, $\mathcal{H}_n = \tfrac{1}{2}(h_1^{2} + h_2^{2})$, is conserved because the flow is Hamiltonian. The second is the Casimir of $\mathfrak{se}(2)^{*}$,

\[C \;=\; h_1^{2} + h_3^{2},\]

which Poisson-commutes with every smooth function and is therefore automatically preserved by any Hamiltonian flow on the dual algebra.

The Casimir labels the symplectic leaves of the Lie–Poisson bracket — the coadjoint orbits. For $\mathfrak{se}(2)^{*}$ the orbits are the cylinders ${h_1^{2} + h_3^{2} = C}$, on which the Hamiltonian dynamics is genuinely symplectic.

Fix the unit-speed normalisation $\mathcal{H}_n = 1/2$, so $h_1^{2} + h_2^{2} = 1$. The angle $\alpha$ defined by

\[h_1 = \sin\alpha, \qquad h_2 = \cos\alpha\]

then evolves as $\dot\alpha = h_3$ (from $\dot h_1 = h_2 h_3$). Using $h_3^{2} = C - h_1^{2} = C - \sin^{2}\alpha$, set $\varphi = 2\alpha$:

\[\dot\varphi^{2} \;=\; 4 h_3^{2} \;=\; (4C - 2) \,+\, 2\cos\varphi.\]

Differentiating once more in time gives the pendulum equation.

The Pendulum Equation

Pendulum ODE for the doubled costate angle
$$\ddot\varphi + \sin\varphi \;=\; 0, \qquad E \;=\; \tfrac{1}{2}\dot\varphi^{2} - \cos\varphi \;=\; 2C - 1,$$ where $\varphi = 2\alpha$ and $\alpha = \arctan(h_1 / h_2)$ is the phase of $(h_1, h_2)$ on the unit circle. The pendulum energy $E$ is fixed by the Casimir $C$ on the coadjoint orbit.

The three dynamically distinct regimes of the pendulum sort every extremal of both horizontal problems — the free SR geodesics and their elastica siblings — into three families:

Energy $E$ Pendulum motion Elastica family
$-1 < E < 1$ oscillation (libration) inflectional
$E = 1$ separatrix (infinite period) borderline (solitary)
$E > 1$ rotation non-inflectional

From the pendulum to the curve — one engine, two problems

The pendulum lives on the costate; getting a plane curve out of it can be done two ways, and they give different curves (Appendix A3 carries both out in full).

The free SR geodesics. Keep both controls. The plane projection’s arc length is $ds = |h_1|\,dt$, its curvature works out to $\kappa_{\mathrm{SR}} = \cot(\varphi/2)$ — unbounded, blowing up each time the forward speed $h_1$ crosses zero — so the projections of SR geodesics are generically curves with cusps, at which the point reverses its direction of travel while the heading keeps turning (Moiseev–Sachkov 2010). These cuspidal curves are the true shortest paths of the V1 metric.

The elastica siblings. Pin the forward speed, $u_1 \equiv 1$, so $t$ is arc length. The very same pendulum now drives the heading directly, and the curvature comes out in closed form as one of the three smooth Jacobi-elliptic profiles below, each solving the elastica curvature ODE — the Duffing form equivalent to the pendulum,

\[\kappa''(s) + \tfrac{1}{2}\kappa(s)^{3} - \mu\,\kappa(s) \;=\; 0,\]

with the integration constant $\mu$ fixed by the Casimir $C$. These are Euler’s elastica — the classical smooth completion curves, and the family every figure in this series draws. One pendulum, two horizontal problems: the smooth elastica where the forward speed never stalls, the cuspidal SR geodesics where it may.

Three Families via Jacobi Elliptic Functions

Inflectional Elastica ($-1 < E < 1$)

The pendulum oscillates; $\varphi(s)$ changes sign. The curvature of the projected plane curve therefore changes sign: these are curves with inflection points.

Setting the energy $E = 2k^{2} - 1$ with $k \in (0, 1)$, the curvature is

\[\boxed{\;\kappa(s) = 2k\,\mathrm{cn}(s \mid k^{2})\;}\]

The Jacobi function $\mathrm{cn}(s \mid k^{2})$ has period $4K(k^{2})$ in $s$, so the curvature and tangent repeat with period

\[T_{\kappa} = 4K(k^{2}).\]

As $k \to 0$: $\mathrm{cn}(s\mid 0) = \cos s$ and the elastica approximates a cosine-curvature curve (nearly straight). As $k \to 1$: $K(1) = \infty$ and the period diverges; on every fixed compact $s$-interval the curve approaches the borderline elastica. A repeated curvature profile does not by itself imply that the plane curve closes: after one period the position may have acquired a nonzero translational drift.

The Borderline (Solitary) Elastica ($E = 1$, separatrix)

At the separatrix the curvature is

\[\kappa(s) = \frac{2}{\cosh s}.\]

This is the borderline elastica — the solitary-wave member of the family, a single loop whose curvature is one smooth bump decaying to zero at both ends; the total turning is $\Delta\theta = 2\pi$, and both tails straighten out along the same asymptotic line. It is the limiting case between oscillating and rotating pendulum, with infinite period $T_\kappa = \infty$. (It is not the Euler–Cornu spiral / clothoid of railway engineering, whose curvature grows linearly, $\kappa \propto s$ — a common conflation worth flagging.)

Non-Inflectional Elastica ($E > 1$)

The pendulum rotates without stopping; $\varphi(s)$ is monotone. Setting $m = 2/(E + 1) \in (0, 1)$ (here $m$ parametrises this family — at $E=1$ the separatrix gives $m=1$, and as $E\to\infty$ we have $m\to 0$) and rescaling arc length by $\sqrt m$ — elastica are defined up to similarity; in the unit-pendulum clock the profile is $\tfrac{2}{\sqrt m}\,\mathrm{dn}(s/\sqrt m \mid m)$, with period $2\sqrt m\,K(m)$ — the curvature is

\[\kappa(s) = 2\,\mathrm{dn}(s \mid m).\]

These curves have no inflection points — the curvature never changes sign. The Jacobi function $\mathrm{dn}(s\mid m)$ has period $2K(m)$ in $s$, so in the rescaled arc length the spatial period is

\[T_{\kappa} = 2K(m).\]

As $m \to 1$: $\mathrm{dn}(s\mid 1) = \mathrm{sech}(s)$ — the non-inflectional family approaches the borderline elastica from the other side. As $m \to 0$: $\mathrm{dn}(s\mid 0) = 1$ and $\kappa \to 2$ — the curves degenerate into circles of radius $1/2$ in the rescaled arc length (high-energy uniform rotation).

Left: κ(s). Right: projected curve (x, y).
Elastica explorer. Left panel: the curvature $\kappa(s)$ as a function of arc length. Right panel: the corresponding plane curve $(x(s), y(s))$ of the pinned Euler-elastica problem. It is not the generically cuspidal projection of a free SE(2) sub-Riemannian geodesic. For the inflectional family, zeros of $\kappa(s) = 2k\,\mathrm{cn}(s\mid k^2)$ coincide with inflection points of the curve; the period is $T_\kappa = 4K(k^2)$. Drag the slider to vary $k$ (or $m$); switch families with the dropdown. Axes and units: lengths are dimensionless, in units of the elastica length scale $\ell$ — the unit of arc length in which the inflectional curvature is $\kappa(s) = 2k\,\mathrm{cn}(s\mid k^2)$ and the pendulum equation is $\ddot\varphi + \sin\varphi = 0$. Left: horizontal axis arc length $s$ (units of $\ell$), vertical axis curvature $\kappa$ (units of $1/\ell$; ticks at $\pm1, \pm2$). Right: the plane $(x, y)$ in units of $\ell$ ($x$ to the right, $y$ up), drawn without tick axes — the scale bar gives the length scale; open dot: start of the arc, filled dot: end.
The period $T_\kappa(k) = 4K(k^2)$ diverges as $k \to 1$. Horizontal axis: the modulus $k \in (0, 1)$ (dimensionless) for the blue curve, and $k = \sqrt{m}$ for the green one. Vertical axis: the curvature period $T_\kappa$ — the arc length after which $\kappa(s)$ repeats, in units of the elastica length scale $\ell$ (linear scale, clipped at 24). Blue, solid: inflectional period $T_\kappa = 4K(k^2)$; green, dashed: non-inflectional period $T_\kappa = 2K(m)$, plotted against $k = \sqrt{m}$ for comparison; the faint dashed line marks $2\pi$. The vertical asymptote at $k = 1$ corresponds to the borderline elastica: infinite period but finite total turning $\int_{-\infty}^{\infty}2\,\mathrm{sech}(s)\,ds=2\pi$. For small $k$: $K(k^2) \approx \pi/2 + \pi k^2/8$, so $T_\kappa \approx 2\pi$ (nearly circular curvature oscillation).
Phase portrait of the pendulum $\ddot\varphi + \sin\varphi = 0$. Closed orbits (blue): libration — inflectional elastica. The separatrix (red, $E = 1$): borderline elastica. Rotation orbits (green): non-inflectional elastica. Each orbit supplies the vertical pendulum data shared by two reconstructions: a family of free SE(2) SR extremals and a family of pinned elastica. The energy determines the regime; the initial phase selects an individual extremal.

The Complete Elliptic Integral K(k²)

The period formula $T_\kappa = 4K(k^{2})$ is not incidental — $K(k^{2})$ is the exact quarter-period of $\mathrm{sn}(s\mid k^{2})$ by definition. This makes the elastica period computable to arbitrary precision via the arithmetic–geometric mean (AGM):

\[K(m) = \frac{\pi}{2\,\mathrm{AGM}\!\bigl(1,\;\sqrt{1 - m}\bigr)}, \qquad m = k^{2}.\]

The AGM converges quadratically: about 16 significant digits in 6 iterations. This is the iteration the elliptic package exposes as agm:

from elliptic import agm
import numpy as np

ellipticK = lambda m: np.pi / (2 * agm(1.0, np.sqrt(1 - m)))   # K(m) = π / (2·AGM(1, √(1−m)))

k  = np.linspace(0, 0.999, 500)
Tk = 4 * ellipticK(k**2)   # spatial period of curvature oscillation

For the Jacobi functions themselves:

from elliptic import ellipj

K = ellipticK(k**2)            # quarter-period of sn, cn
s = np.linspace(-2*K, 2*K, 800)
sn, cn, dn, _ = ellipj(s, k**2)   # ellipj returns (sn, cn, dn, am)
kappa = 2 * k * cn             # curvature of inflectional elastica

The three functions satisfy the differential equations

\[\frac{d}{ds}\mathrm{sn} = \mathrm{cn}\,\mathrm{dn}, \qquad \frac{d}{ds}\mathrm{cn} = -\mathrm{sn}\,\mathrm{dn}, \qquad \frac{d}{ds}\mathrm{dn} = -m\,\mathrm{sn}\,\mathrm{cn},\]

and the Pythagorean identities

\[\mathrm{sn}^{2} + \mathrm{cn}^{2} = 1, \qquad \mathrm{dn}^{2} + m\,\mathrm{sn}^{2} = 1.\]

These let us differentiate $\kappa(s)$ analytically:

\[\kappa'(s) = -2k\,\mathrm{sn}(s)\,\mathrm{dn}(s),\]

which will be essential in Part 3 for locating Maxwell strata.

Integrating the Elastica

Given $\kappa(s)$, the plane curve is recovered by Frenet–Serret integration:

\[\frac{d}{ds}\begin{pmatrix}x\\ y\\ \theta\end{pmatrix} = \begin{pmatrix}\cos\theta\\ \sin\theta\\ \kappa(s)\end{pmatrix}.\]

The $\theta$-equation integrates explicitly for the inflectional family:

\[\theta(s) = \theta_0 + 2\arcsin\!\bigl(k\,\mathrm{sn}(s\mid k^{2})\bigr),\]

then $x, y$ require a further integration involving $\mathrm{sn}$ and $\mathrm{cn}$ that can be expressed via the incomplete elliptic integral of the second kind $E(s\mid k^{2})$.

In the elliptic package:

from elliptic import elliptic12

am = np.arcsin(sn)                       # Jacobi amplitude am(s | k²), valid for |s| ≤ K
                                         # (beyond that, unwrap am continuously)
F_vals, E_vals, _ = elliptic12(am, k**2) # F(am | k²) = s  and  E(am | k²); third value is Jacobi Z
x = 2 * E_vals - F_vals                  # x(s) = 2 E(am(s)|k²) − s

The full closed-form expressions are classical (in the present notation see Sachkov 2008, cited in Part 3). With $\theta_0 = 0$ and the curve started at the origin,

\[x(s) = 2E\bigl(\mathrm{am}(s\mid k^2)\mid k^2\bigr) - s, \qquad y(s) = 2k\bigl(1 - \mathrm{cn}(s\mid k^2)\bigr),\]

obtained by integrating $\cos\theta = 1 - 2k^2\mathrm{sn}^2$ and $\sin\theta = 2k\,\mathrm{sn}\,\mathrm{dn}$. No numerical ODE integration is needed.

What the Three Families Look Like

The interactive figure above lets you explore all three families. A few landmarks worth noting:

Blue: inflectional (k = 0.3, 0.6, 0.9)  ·  Red: borderline elastica  ·  Green: non-inflectional (m = 0.3, 0.6, 0.9)
All three families of Euler's elastica rendered at the same scale. Blue curves (inflectional): oscillate between positive and negative curvature; the amplitude grows with $k$. Red (borderline elastica / separatrix): the limiting case between oscillation and rotation. Green (non-inflectional): curvature stays one-signed; the curves resemble deformed circles. Every smooth completion curve of the pinned problem is one of these elastica; the free SR geodesics project to their cuspidal cousins (Appendix A3). Axes: the panel is the plane $(x, y)$ in units of the elastica length scale $\ell$ ($x$ to the right, $y$ up; all curves start at the grey dot), drawn without tick axes — the scale bar (bottom left) gives the length scale.

Summary and Preview of Part 3

We have shown that the reduced pendulum has three Jacobi-elliptic regimes. For the pinned reconstruction they give the three smooth Euler-elastica families, with inflectional curvature $\kappa(s)=2k\,\mathrm{cn}(s\mid k^2)$. For the free SR reconstruction the same pendulum produces different, generically cuspidal plane curves whose curvature is not this elastica profile. The complete elliptic integral $K(k^2)$ controls the spatial period of the curvature, and the closed-form $x(s), y(s)$ involve elliptic integrals of the second kind.

The next natural question is: which geodesics are globally optimal? A geodesic may be locally length-minimising (no shorter path in a thin tube) while a completely different geodesic of the same length exists. The locus where this happens — where two distinct geodesics of equal length meet — is the Maxwell stratum.

In Part 3 we will show that the Maxwell strata are governed by the discrete reflection group of the pendulum — the $(\mathbb{Z}_2)^3$ of Moiseev–Sachkov (2010) — and compute the mirror-pair tie exactly on the elastica family: two mirror elastica first re-meet after one full curvature period,

\[s \;=\; 4K(k^{2}),\]

the same elliptic integral that controls the oscillation. For the free SR problem the same symmetry machinery gives the sharper (and different!) answer — the cut time is $2K(k^2)$, half a pendulum period — which is Part 4’s story. The elliptic clock $K(k^2)$ runs both problems.

References

  1. I. Moiseev & Yu. L. Sachkov (2010). "Maxwell strata in sub-Riemannian problem on the group of motions of a plane." ESAIM: COCV 16(2): 380–399. arXiv:0807.4731
  2. Yu. L. Sachkov (2011). "Cut locus and optimal synthesis in the sub-Riemannian problem on the group of motions of a plane." ESAIM: COCV 17(2): 293–321. arXiv:0903.0727
  3. Yu. L. Sachkov (2003). "Exponential mapping in generalized Dido's problem." Mat. Sbornik 194(9): 63–90.
  4. L. Euler (1744). Methodus inveniendi lineas curvas maximi minimive proprietate gaudentes. Lausanne: Marcum-Michaelem Bousquet. Additamentum I (De curvis elasticis).
  5. M. Abramowitz & I. A. Stegun (1964). Handbook of Mathematical Functions. National Bureau of Standards. §16 (Jacobian Elliptic Functions), §17 (Elliptic Integrals).
  6. J. Petitot (2003). "The neurogeometry of pinwheels as a sub-Riemannian contact structure." Journal of Physiology–Paris 97(2–3): 265–309.
  7. L. S. Pontryagin et al. (1962). The Mathematical Theory of Optimal Processes. Wiley–Interscience.