Out of Round

Quantizing chaos, from the circle to the bowtie island
Abstract

Deforming Part I's integrable disk into a quadrupole, $r(\theta)=1+\varepsilon\cos 2\theta$, breaks the conservation of the angle of incidence and turns the phase space mixed — surviving invariant tori interleaved with a chaotic sea. This notebook follows one structure through the transition: the period-4 bowtie orbit. Classically it anchors a stable island; quantum-mechanically its Bohr–Sommerfeld quantization seeds a family of high-$Q$ island modes, the physics of the bowtie microlaser. We build the Poincaré section, map the escape-time fractal of the mixed phase space, and close with a live explorer that ties each classical launch to the resonance it seeds. Throughout we keep one distinction sharp: an island mode on a stable orbit is not a scar — scars live on unstable orbits, and wait for Part III.

In Part I the cavity was a perfect disk — integrable, every ray conserving its angle of incidence, the modes a clean ladder of whispering-gallery states. Here we pull the disk out of round into a quadrupole, $r(\theta) = 1 + \varepsilon\cos 2\theta$, and watch that order break.

As $\varepsilon$ grows the rotational symmetry is gone: the angle of incidence is no longer conserved, and the phase space turns mixed — surviving invariant tori (regular orbits) interleaved with a chaotic sea [1]. The regular motion organises into islands around stable periodic orbits, while the sea is threaded by unstable ones. This is the setting for the rest of the story.

We follow one structure through it: the period-4 bowtie orbit. Classically it sits at the centre of a stable island; quantum-mechanically it carries a family of high-$Q$ resonances — the bowtie island mode, the same physics as the Gmachl bowtie microlaser [2]. Along the way we build the Poincaré section, map the escape-time fractal of the mixed phase space, quantise the orbit by Bohr–Sommerfeld, and end with a live explorer that ties each classical launch to the resonance it seeds.

A note on words, settled below: a mode localised on a stable island orbit (like the bowtie here) is an island mode, quantised by Bohr–Sommerfeld/EBK — not a scar. A true scar lives on an unstable orbit, the anomalous localisation Heller identified in 1984 [3]. We keep that distinction sharp.

From the circle to the section

In Part 1 every whispering-gallery ray struck the wall at the same angle of incidence, bounce after bounce — the angle was conserved, a consequence of the circle's rotational symmetry. The standard way to see this is the Poincaré section: at each reflection, record where on the wall the ray lands and the sine of its angle of incidence,

$$ \bigl(\; s/L,\;\; \sin\phi \;\bigr), $$

and plot a point. As the ray bounces around, it traces a curve in this plane.

For the circle that curve is trivial. The angular momentum $\sin\phi$ is conserved, so every ray obeys

$$ \sin\phi = \text{const}, $$

a horizontal line. The section is a stack of these lines — the cavity is integrable, every trajectory regular, nothing mixing with anything else. Whispering-gallery modes live in the top band, $\sin\phi \to 1$ (grazing incidence), well above the critical angle $\sin\chi_c = 1/n$ where total internal reflection traps the light.

output

Look closer at those horizontal lines. A ray striking the wall at angle of incidence $\phi$ advances around the circle by a fixed central angle each bounce,

$$ \Delta\theta = \pi - 2\phi. $$

For most $\phi$ this is an irrational fraction of a full turn: the ray never repeats and eventually fills the annulus densely. But when it is rational,

$$ \frac{\Delta\theta}{2\pi} = \frac{p}{q}, $$

the ray closes after exactly $q$ bounces, having wound $p$ times around — a $\{q/p\}$ star polygon, tangent to a caustic of radius

$$ r_c = \sin\phi = \cos\frac{\pi p}{q}, $$

the very same caustic geometry as a Part-1 whispering-gallery mode.

output
output

Now deform the circle — pull it out of round. Turn up ε and the rotational symmetry is gone — the angle of incidence is no longer conserved. Some rays hold on, their horizontal lines merely bending into wavy but unbroken KAM curves (surviving tori); others shatter into a scatter of points — a chaotic sea [4].

And the special rational lines? Each was a whole family of closed polygons — degenerate, every rotation of the orbit periodic. A smooth deformation cannot preserve a family: by the Poincaré–Birkhoff theorem it collapses to a finite, even number of isolated periodic orbits, half stable (the elliptic islands you can pick out in the section) and half unstable (hyperbolic). The bowtie we are chasing is one of those unstable survivors. This is the mixed phase space where the rest of the story plays out.

"section helpers ready"
output
# The bowtie: a period-4 STABLE (elliptic) orbit of the ε=0.165 quadrupole, located in the interactive
# explorer. Trace it from the refined initial condition; its four bounces are the corners
# (±0.570, ±0.764) and it crosses the centre twice → the X. (Its monodromy trace ≈ −1.85, |tr|<2: stable.)
bowtie = let ε = 0.165, b = QuadrupoleBilliard(ε)
    pos0 = BVec2(0.56987, 0.763827); vel0 = BVec2(-0.597979, -0.801512)
    part = Particle(pos0 + 1e-7 * vel0, vel0); pts = typeof(pos0)[]
    for _ in 1:4
        t, idx, cp, nrm, vref, θ = find_next_collision(part, b)
        push!(pts, cp); part.pos = cp; part.vel = vref; part.pos = part.pos + 1e-9 * part.vel
    end
    dist(a, c) = hypot(a[1] - c[1], a[2] - c[2])
    L = sum(dist(pts[mod1(i + 1, 4)], pts[i]) for i in 1:4)
    (ε=ε, b=b, pos0=pos0, vel0=vel0, pts=pts, L=L)
end
"bowtie · period 4 · L=$(round(bowtie.L; digits=5)) · bounces at $([(round(p[1];digits=2),round(p[2];digits=2)) for p in bowtie.pts])"
"bowtie · period 4 · L=6.86737 · bounces at [(-0.57, -0.76), (-0.57, 0.76), (0.57, -0.76), (0.57, 0.76)]"

Quantizing the bowtie

Because the bowtie is a stable orbit, a wave can genuinely ride it. Circulating the orbit of length $L$ once, the wave accumulates the optical path $n k L$ plus a fixed phase from the four reflections and the orbit's focusing — bundled into a Maslov index $\mu$. It resonates when the round-trip phase is a multiple of $2\pi$:

$$ n k L = 2\pi\Bigl(N + \tfrac{\mu}{4}\Bigr) \quad\Longrightarrow\quad k_N = \frac{2\pi\,(N + \mu/4)}{n L}, \qquad \Delta k = \frac{2\pi}{n L}. $$

With $\mu = 8$ (two per bounce, over four bounces), this evenly spaced ladder of $k_N$ is exactly where we seed the boundary-integral solver to find the bowtie island mode. This is Bohr–Sommerfeld quantisation of the central orbit; the surrounding tori supply the transverse quantum number — the same EBK picture as a whispering-gallery mode, with the bowtie standing in for the circle.

# Bohr–Sommerfeld quantization of the bowtie. The optical round trip is n·k·L + reflection phases,
# quantized to 2πN, so the island mode should sit near k_vac ≈ 2π(N + μ/4)/(n·L), spaced Δk = 2π/(nL).
# Maslov index μ = 2·(bounces) = 8. These are the wavenumbers to seed the BIM solver at — the
# interactive explorer below does exactly that on a ⇧-click.
bs = let n = 3.3, L = bowtie.L, μ = 8
    kN(N) = 2π * (N + μ/4) / (n * L)
    (n=n, L=L, Δk=round(2π/(n*L); digits=4), ladder=[(N=N, k=round(kN(N); digits=4)) for N in 30:44])
end
(n = 3.3, L = 6.867370298459164, Δk = 0.2773, ladder = [(N = 30, k = 8.8721), (N = 31, k = 9.1493), (N = 32, k = 9.4266), (N = 33, k = 9.7038), (N = 34, k = 9.9811), (N = 35, k = 10.2583), (N = 36, k = 10.5356), (N = 37, k = 10.8128), (N = 38, k = 11.0901), (N = 39, k = 11.3674), (N = 40, k = 11.6446), (N = 41, k = 11.9219), (N = 42, k = 12.1991), (N = 43, k = 12.4764), (N = 44, k = 12.7536)])

Seed the boundary-integral solver at that ladder, refine, and the bowtie island mode appears — a high-$Q$ resonance with its intensity braided along the X. Here it is prebaked, revived from a saved solve of the $\varepsilon=0.16$, $n=3.3$ cavity:

output
# Two single rays in the deformed cavity at the same ε. A near-grazing launch stays on a regular
# torus and traces a clean caustic; a launch into the chaotic sea fills the cavity ergodically.
function ray_path(b, sp0; nbounce=270)
    p0, v0 = Chaos.Dynamics.poincare_to_state(0.0, sp0, b)
    part = Particle(p0, v0); pts = [p0]
    for _ in 1:nbounce
        t, idx, cp, nrm, vref, θ = find_next_collision(part, b)
        (idx == 0 || t == Inf) && break
        push!(pts, cp); part.pos = cp; part.vel = vref; part.pos = part.pos + 1e-6 * part.vel
    end
    ([p[1] for p in pts], [p[2] for p in pts])
end

function two_rays(ε)
    b = QuadrupoleBilliard(ε)
    ts = range(0, 2π; length=600)
    bx = [(1 + ε*cos(2t))*cos(t) for t in ts]; by = [(1 + ε*cos(2t))*sin(t) for t in ts]
    fig = Figure(size=(780, 410), backgroundcolor=:black)
    for (col, (sp0, lab, c)) in enumerate([(0.95, "regular  (near-grazing torus)", :cyan),
                                           (0.48, "chaotic  (fills the cavity)", :orange)])
        ax = Axis(fig[1, col], aspect=DataAspect(), backgroundcolor=:black, title=lab, titlecolor=:white, titlesize=13)
        hidedecorations!(ax); hidespines!(ax)
        lines!(ax, bx, by; color=(:white, 0.55), linewidth=2.2)
        xs, ys = ray_path(b, sp0)
        lines!(ax, xs, ys; color=(c, 0.55), linewidth=0.6)
    end
    fig
end
rays_eps = 0.11
two_rays(rays_eps)
output
# Those same two rays, now on the Poincaré section (ε follows the slider). The regular launch lands on a
# smooth KAM curve — a torus; the chaotic launch scatters over the sea. Real space above, phase space here.
let ε = rays_eps, b = QuadrupoleBilliard(ε), (bgx, bgy) = psos_bg(ε)
    fig = Figure(size=(780, 380), backgroundcolor=:black)
    for (col, (sp0, lab, c, nb, ms)) in enumerate([(0.95, "regular → KAM curve", :cyan, 8000, 2.0),
                                                    (0.48, "chaotic → fills the sea", :orange, 1550, 3.5)])
        ax = Axis(fig[1, col], backgroundcolor=:black, xlabel="s / L",
                  ylabel = col == 1 ? "sin φ" : "", title=lab, titlecolor=:white, titlesize=13)
        scatter!(ax, bgx, bgy; markersize=1.3, color=(:gray, 0.22))
        p0, v0 = poincare_to_state(0.0, sp0, b)
        rx, ry = psos_ray(b, p0, v0, ε; nbounce=nb)
        scatter!(ax, rx, ry; markersize=ms, color=c)
        xlims!(ax, 0, 1); ylims!(ax, -1, 1)
    end
    fig
end
output

Between order and chaos: the periodic orbits

The two rays above are the generic fates of a launch: settle onto a regular torus, or wander the chaotic sea forever. But the sea is not featureless. Threaded through the whole mixed phase space is a skeleton of periodic orbits — rays that close on themselves after a few bounces and then repeat — and they come in two kinds that could not behave more differently.

An unstable (hyperbolic) orbit lives in the chaotic sea. A ray launched a distance $\delta_0$ from it separates as

$$ \delta_n \sim \delta_0\, e^{\lambda n}, \qquad \lambda > 0, $$

with $n$ the bounce number and $\lambda>0$ a Lyapunov exponent: the ray shadows the orbit for a bounce or two, then peels away into the chaos. A stable (elliptic) orbit is the opposite — neighbouring rays circulate around it without escaping, filling a nested stack of tori. That ring of regular motion is exactly the island you see punctuating the section.

The bowtie is one such orbit: period 4, glancing off the flattened top and bottom and crossing the centre twice to trace an X. Crucially, at this deformation it is stable — its monodromy trace is $\approx -1.85$, safely inside $|\mathrm{tr}| < 2$ — so it anchors an island of stability, not a strand of chaos. A wave trapped on that island is a high-$Q$ island mode, quantised by Bohr–Sommerfeld/EBK; it is the same physics as the Gmachl bowtie microlaser.

This is not a scar, and the difference is the whole point. A genuine scar is the unstable-orbit counterpart — a resonance that piles up along a hyperbolic orbit where no classical ray can linger, the anomalous localisation Eric Heller identified in 1984. The rest of the notebook quantises the bowtie island mode; the interactive explorer at the end lets you tell the two apart, by clicking an orbit and reading its stability directly.

output
output

An interactive phase-space fractal

The escape-time map is a genuine fractal: colour each initial condition by how many bounces its orbit stays trapped near the period-4 bowtie island chain before diffusing into the chaotic sea. The regular islands never escape (black — the "interior", like the Mandelbrot set); the sticky layer at the separatrix traps orbits for wildly initial-condition-dependent times, drawing the filigree edge. Zoom in and the structure recurs — secondary islands ringed by their own bands.

Each frame is one billiard map run per pixel, so it is embarrassingly parallel. PhaseSpaceGPU (in src/) runs it one GPU thread per initial condition via Metal on the Apple GPU — a 400² map in ~0.2 s (≈130× the 12-thread CPU), fast enough to recompute live as you pan and zoom below. The GPU path is Float32, so very deep dives eventually show floating-point grain; the CPU path is Float64 for final renders.

"explorer ready · GPU=true"
"png encoder ready"

Smooth WebGL zoom

The same escape-time map, but computed per pixel in a WebGL2 fragment shader — the whole billiard trajectory runs on the browser GPU, so zoom is just changing uniforms with no round-trip. Because each pixel is ~100× heavier than a Mandelbrot pixel (a full trajectory + a root-find per bounce), it uses adaptive quality: while you move it renders cheap (few iterations); the moment you stop it sharpens. Scroll to zoom about the cursor, drag to pan, and switch the per-pixel metric — escape time, recurrence time, or rotation number — with the buttons.

ε 0.165
metric: palette:
phase space · φ/2π vs sin φ · hover to trace · ⇧shift-click to lock / unlock
real-space billiard
scroll → zoom about cursor · drag → pan · ε deforms the cavity · rung = Bohr–Sommerfeld ladder step · red line = TIR angle |sin φ| = 1/n

Click a launch, solve its mode

⇧ Shift-click anywhere in the explorer above. That launch condition is traced as a classical billiard orbit (hundreds of bounces) and shown both in real space and as its Poincaré section — so you can see immediately whether you landed on an island, a torus, or the chaotic sea. Its Bohr–Sommerfeld wavenumber then seeds a boundary-integral solve of the actual resonance at that ε, and the mode's Husimi distribution [5][6] lands back on the very phase-space structure you clicked. The wave equation is solved live, so give it ~20 s.

⇧ Shift-click a point in the fractal explorer above to lock a launch, then hit solve (~20 s).

Coda

We started with the disk of Part I and pulled it out of round. The single conserved angle of incidence gave way to a mixed phase space — surviving tori and a chaotic sea — and one structure carried the story through it: the period-4 bowtie. In the section it is a chain of stable elliptic islands; in real space, nearby rays stay trapped, weaving a band around the X. Quantised by Bohr–Sommerfeld on that stable orbit, it supports a family of high-$Q$ island modes — the physics of the Gmachl bowtie microlaser [2] — which the live explorer solves straight from a classical launch.

The escape-time fractal made the mixed phase space visible as a self-similar landscape, and the live WebGL explorer closes the loop: click a launch, watch its classical orbit and Poincaré section, and solve the very resonance it seeds — the classical skeleton and the quantum flesh side by side.

And we kept one distinction sharp throughout: a mode on a stable orbit is an island mode (Bohr–Sommerfeld / EBK) — not a scar. A true scar lives on an unstable (hyperbolic) orbit, where no classical ray can linger yet the wave anomalously piles up [3]. That is the next chapter: the folded chaotic whispering-gallery modes on the cavity's unstable periodic orbits.

Next: Part III — The Figure Poincaré Would Not Draw.

References

  1. Nöckel, Jens U. and Stone, A. Douglas. Ray and wave chaos in asymmetric resonant optical cavities. 1997.
  2. Gmachl, C. and Capasso, F. and Narimanov, E. E. and Nöckel, J. U. and Stone, A. D. and Faist, J. and Sivco, D. L. and Cho, A. Y.. High-power directional emission from microlasers with chaotic resonators. 1998.
  3. Heller, Eric J.. Bound-state eigenfunctions of classically chaotic Hamiltonian systems: scars of periodic orbits. 1984.
  4. Robnik, Marko. Classical dynamics of a family of billiards with analytic boundaries. 1983.
  5. Crespi, B. and Perez, G. and Chang, S.-J.. Quantum Poincaré sections for two-dimensional billiards. 1993.
  6. Bäcker, A. and Fürstberger, S. and Schubert, R.. Poincaré-Husimi representation of eigenstates in quantum billiards. 2004.