1. Model and conventions
Configuration space. The torus is T² = ℝ²/2ℤ², drawn as the square [−1, 1)² with opposite sides identified. The scatterer is the closed disk D of radius R ∈ (0, 1) centred at the origin; in the lifted picture (lattice view) there is a copy of D at every point of 2ℤ². Since R < 1 the copies are disjoint.
Dynamics. The Hamiltonian is H = |p|²/2 + V(q) with V radial on D and V ≡ 0 outside D, on the energy surface H = 1/2. Outside the scatterer the particle therefore moves along straight lines with unit speed. Inside D only the net effect of the passage matters, and it is encoded entirely in the angle map F (section 2); V itself is never needed unless you choose the V(r) mode (section 5).
Poincaré sections. Write e(α) = (cos α, sin α).
- M⁺ (outgoing): pairs (θ, φ) with θ ∈ [0, 2π) and φ ∈ [−π/2, π/2]. The particle leaves D at the point R e(θ), with velocity e(ψ), where ψ = θ + φ. So φ is the angle between the velocity and the outward normal.
- M⁻ (ingoing): pairs (θ, φ). The particle enters D at R e(θ) with velocity e(ψ), ψ = θ + π − φ, so φ is the angle with the inward normal.
In both, the sign of φ is fixed so that the angular momentum about the centre of D is
positive for counter-clockwise motion around the centre. On the energy surface L is conserved during the passage, because V is radial.
Maps.
- T₀ : M⁺ → M⁻, free flight from the exit point to the next entry (into some copy of D in the lift; on T² it is D again).
- P : M⁻ → M⁺, the passage through D: P(θ, φ) = (θ + ΔΘ(φ), φ). The exit angle equals the entry angle because L is conserved and |v| = 1 at both ends. ΔΘ(φ) is the angular displacement of the exit point relative to the entry point (not the rotation of the velocity).
- T = P ∘ T₀ : M⁺ → M⁺, the first-return map. This is what is iterated, plotted on the right and analysed by all the tools. (T⁻ = T₀ ∘ P is conjugate to T by P.)
Reference case. With no potential the particle crosses D along a chord, and ΔΘ(φ) = π − 2φ.
2. The angle map F
Definition. F is entered in the F(θ) field (with presets; a small plot of F is shown next to it, and beside it a plot of F′ on the same θ-axis, with dashed F′ = 1 (free flight) and dotted F′ = 0 (hard disk); its vertical window is the 2–98 % range of the values, always containing [0, 1], with the window ends written on the right. In both, the θ where F focuses, 0 < F′ < 1, are shaded (section 7); hovering shows the proportions; click either one to see it large, with axes). For θ ∈ [0, π] let
So θ = π − 2φ is the angle the chord would subtend; θ = 0 is grazing, θ = π is head-on. Free flight is F = id.
Negative φ. Reflecting an orbit across the line through the centre and the entry point turns L into −L and reverses the angular displacement, so ΔΘ(−φ) = −ΔΘ(φ) for a radial potential. Hence
Equivalently, F extends to the odd lift F̂ : ℝ → ℝ with F̂(θ + 2π) = F̂(θ) + 2π, F̂ = F on (0, π) and F̂(θ) = 2π − F(2π − θ) on (π, 2π); the circle map is f(eiθ) = eiF̂(θ). F̂ is continuous at 0 iff F(0) = 0 and at π iff F(π) = π. For T only ΔΘ mod 2π matters: since ΔΘ(0±) = ±F(π), T is continuous across the head-on line φ = 0 iff F(π) ∈ πℤ (F(π) = π: through the centre; F(π) = 0: straight back), and otherwise φ = 0 is an extra discontinuity line of T. F(0) ≠ 0 means that even nearly grazing particles are deflected by a finite angle (for example when V jumps at R).
ΔΘ is a real number, not an angle mod 2π. For T only ΔΘ mod 2π matters, but the real value says how many times the orbit winds around the centre inside D; it is used for drawing (section 6) and in the Jacobian.
Deflection. For φ > 0 the velocity turns by
and by −(F(θ) − θ) for φ < 0. So F − id is the deflection, and F′ − 1 measures how the deflection changes across a beam of parallel trajectories: F′ = 1 keeps parallel beams parallel (the parabolic case). Whether a passage focuses or disperses is decided by F′ itself: it focuses iff 0 < F′ < 1 (section 7). This is the mechanism behind hyperbolicity in soft billiards.
Example. F(θ) = θ + 2πα turns every velocity by ±2πα according to the sign of L. The map is then piecewise an isometry of the plane composed with free flight, it is parabolic everywhere, and all Lyapunov exponents vanish.
3. Invariant measure
T preserves the measure
T₀ preserves it because it is the section map of the billiard flow (the classical Liouville argument), and P preserves it because it is a shear (θ, φ) ↦ (θ + ΔΘ(φ), φ). The second form says that μ is uniform in the coordinates (θ, sin φ). That is why the section has a “sin φ” option: there, a typical orbit of an ergodic map fills the rectangle uniformly, while in the (θ, φ) coordinates it is denser near φ = 0.
A consequence used below: on M⁺, det DT(x) = cos φ(x) / cos φ(Tx), and at a periodic point of period p, det DTᵖ = 1.
4. Free flight
T₀ is computed exactly. From the exit point x with direction v, the lattice cells [2i, 2i+2] × [2j, 2j+2] are traversed in the order the ray meets them; every disk the ray can hit has its centre at a corner of one of these cells (its closest approach is within R < 1 of the centre). For each candidate centre c the entry time is the smaller root of |x + tv − c| = R. Traversal stops once no later cell can give an earlier hit.
Infinite horizon. Since R < 1 there are straight lines (for example y = 1) that never meet a disk, so free flights near rational directions can be arbitrarily long. A flight longer than max flight stops the orbit; the status bar and a × on M⁺ show this.
Entry state. If the ray enters the disk centred at c at the point y, then θ₁ = arg(y − c) and sin φ₁ = ((y − c) × v)/R. Since y − x is parallel to v, (y − c) × v = (x − c) × v, which gives the closed form used for the Jacobian:
with c the centre of the next disk relative to the current one.
5. F from a potential V
This is the V(r) mode; V is entered in the V(r) field.
Formula. With L = R sin φ and g(r) = r²(1 − 2V(r)), radial motion at energy 1/2 has ṙ² = (g(r) − L²)/r² and θ̇ = L/r². The particle enters at r = R, turns at the first radius r* < R where g(r*) = L², and leaves symmetrically, so
With w = L/r this becomes
For V = 0 this gives π − 2φ, as it should.
Special cases.
- Reflection. If 1 − 2V(R) ≤ sin² φ, the radicand is ≤ 0 already at the boundary, so the particle is reflected at ∂D: ΔΘ = 0, and the exit point is the entry point.
- Capture. If g(r) > L² all the way to r → 0 (for example V = −c/r² with c ≥ 1/2), there is no turning point and the particle falls into the centre. F is then undefined there and orbits that reach it stop.
- Closed forms exist for a few families:
- constant V₀ < 1/2 inside D: F(θ) = π − 2 arcsin(cos(θ/2)/n), n = √(1 − 2V₀), and F = 0 when cos(θ/2) ≥ n;
- V = 1 − R/r: F(θ) = π + θ;
- Coulomb-type −k/r + k/R, harmonic k r² and c/r² (elementary integrals).
Numerical evaluation (one value of F).
- Everything is written in δ = w − sin φ, with sin φ = cos(θ/2) and cos φ = sin(θ/2) computed from θ:
h(δ) = cos²φ − δ(2 sin φ + δ) − 2V( R sin φ / (sin φ + δ) ).This avoids the cancellation in 1 − w² near grazing.
- The turning point is the first zero of h: 200 uniform steps in r from R to R/200, then 150 geometric steps down to about 10⁻¹⁵R, then bisection to relative precision 4·10⁻¹⁶. A barrier thinner than about R/200 can be missed.
- The substitution δ = δ*(1 − cos πv)/2 removes the square-root singularity at the turning point (v = 1) and clusters nodes near δ = 0, where h can have a nearby root (small L with a singular V). The integral in v is done with 8-point Gauss–Legendre on 29 panels, graded geometrically towards v = 0 down to 10⁻⁹.
- Pointwise accuracy is about 10⁻¹² for well-conditioned V.
Table. By default F is tabulated and interpolated:
- 2049 equally spaced nodes on [0, π];
- then repeated passes: F is evaluated exactly at the midpoint of every cell under test, and cells where the interpolant misses by more than 10⁻⁹·max(1, |F|) are split, down to cells of width π/32768 (up to 12000 nodes);
- interpolation is cubic Hermite with three-point slopes, limited to stay monotone where the data are;
- the endpoints θ = 0 and θ = π are limits (grazing, head-on) and are extrapolated quadratically from the first three nodes.
Where F is smooth, interpolation errors are ≲ 10⁻⁹. Near points where F is not smooth (critical angles, the onset of reflection) the error is larger in one small cell; “exact F” avoids this by evaluating the integral at every passage, which is slower. F′ (needed for the exponents and the Jacobian) is always taken from the table.
A limit of double precision. If V′(R) ≠ 0 (for example V = 1 − R/r), F near grazing is determined by differences of numbers of size θ², and evaluating V itself in double precision gives errors of order 10⁻¹⁶/θ². Values for θ ≲ 10⁻³ are therefore less accurate; this cannot be fixed without higher-precision evaluation of V.
6. What the pictures show
Configuration space. Straight segments are the free flights between an exit point and the next entry. In the T² view they are cut and continued across the identified sides; in the lattice view the orbit is shown in the lift. A periodic orbit of T closes up on T² but in the lift it moves by a lattice vector each period. Only the first drawn steps passages are drawn; the section shows all N iterates.
Mouse. Configuration space: click to place a point (inside D it snaps to ∂D), move to aim and click again to fix the direction (Esc or right-click cancels); drag a dot or an arrow tip to edit it; click a dot to remove its orbit. Steering. Any arrowhead on the path (the flow arrows of the lattice view and the arrow at the end of the path) can be grabbed and turned: the app changes only the initial direction ψ₀ so that the line of that flight m passes through the pointer, keeping the disks hit before flight m and, at each of those passages, the side of the head-on line (the incidence angle never crosses 0, where the deflection can jump and the path would flicker). The start sm(ψ₀) of flight m moves with ψ₀ too, often much faster than its direction ψm (for the rotation F = θ + c, ψm − ψ₀ is constant while sm moves tens of units per radian), so the equation solved includes it: G(ψ₀) = ψm(ψ₀) − arg(pointer − sm(ψ₀)) = 0. (Aiming instead along the direction from where the flight starts now, and repeating at every mouse move, is an iteration that diverges when sm moves fast: small movements changed the orbit a lot.) When the arrow is grabbed, the app finds the whole range of ψ₀ (around the current one) with these collisions and tabulates the flight on it (400 points). At every mouse move it takes the root of G closest to the current ψ₀, so the path changes continuously: Newton steps from the current ψ₀, else the nearest sign change of G in the table, refined by bisection. On T² the pointer is taken in the copy (pointer + 2ℤ²) lying along the flight as computed, and the same copy is kept while the flight stays near it. When no root exists, the arrow stops as close as it can get, and the view says why: an earlier passage would change disk (a tangency, section 6.1) or go head-on through its disk, a flight would exceed max flight, or no initial direction makes the flight pass through the pointer (for example beyond a turning point of ψm, dψm/dψ₀ = 0: a caustic of the beam of lines leaving the start point, which happens after a strong lens, ½ < F′ < 1, at its focal distance). Example: from the default start with F = a·t, a = 0.8, R = 0.3, flight 1 turns left only until the first passage is head-on. In Jacobi coordinates dψm/dψ₀ is the ζ-component of the image of the point-source vector (0, 1); if every passage before flight m passes Proposition 2 of 7.3, the product has all entries of one sign, so this component is non-zero and only collisions can block. Caustics need focusing passages. Since dψm/dψ₀ grows roughly like eλm, arrows far along a chaotic path move with tiny changes of ψ₀ and become hard to control. When the last drawn passage has its inner curve drawn, the path ends with an arrow leaving the disk. In the T² view, the wheel (out or in) switches to the lattice view, keeping the point under the mouse in place; there, drag to pan and use the wheel to zoom. Crossing the T² scale, in either direction, with the view on the central cell returns to T². T² is a compulsory stop on the way in: when a scroll in the lattice view reaches T², the rest of that scroll (trackpad inertia included) is ignored, and the next scroll goes on, in either direction. Leaving T² is immediate. In the lattice view every free flight on screen has at least one arrowhead (to grab and steer it), whatever the zoom. Section M⁺: click to start an orbit at that point; drag its ring to move the start; click a ring to remove the orbit (right-click too); resting the pointer on a ring for a moment (0.35 s) shows a “find periodic” button next to it (section 8), which stays while the pointer is near the ring or the button; wheel to zoom, drag to pan. The coordinates under the mouse are shown at the top right. Keep orbits (key K) makes a new orbit join the others instead of replacing the last one; holding Shift turns it on for as long as the key is held, to add a few orbits quickly. Clear removes them all. Undo: ⌘Z (Ctrl+Z on Windows and Linux) undoes the last change to the orbits (adding, removing, clearing, dragging a start point, direction or arrowhead, a periodic orbit found, loading a session); ⌘⇧Z (Ctrl+Shift+Z) redoes it. There is no button for it.
The curves inside the disk are cosmetic (V is not used), but they are consistent with F:
- A curve starts at the entry point and ends at the exit point.
- Its polar angle runs monotonically through the full real ΔΘ, so the number of laps is the true one.
- Geometrically it is a straight chord of impact parameter b, r = b / cos β with β ∈ [−β₀, β₀] and β₀ = arccos(b/R), whose polar angle is stretched by ΔΘ/(2β₀). These are exactly the orbits of a c/r² potential, which is why they look like natural precessing passages.
- b = R sin φb is chosen from (π − 2φb) cot φb = |ΔΘ cot φ|, which makes the curve tangent to the incoming and outgoing velocities whenever sgn ΔΘ = sgn φ (the physical case).
- ΔΘ = 0 (reflection) is drawn as a small hairpin.
- In the lattice view all passages get a curve and the free flights get direction arrows; in the T² view, where everything is drawn on top of one disk, only the first passage gets a curve and there are no arrows.
Section. Points (θ, φ) or (θ, sin φ) of the orbit on M⁺. The ring marks the first point. A × marks where an orbit stopped because of max flight. Diamonds mark the points of a periodic orbit found with “find periodic” (rest the pointer on a ring; section 8). The Layers bar adds a map underneath (the λT map or the cone test, sections 9.4 and 9.6) and the singular curves (6.1); hyperbolic periodic orbits can show their invariant manifolds (6.2). Choosing a map that is not yet computed for the current dynamics computes it there, with the settings of its panel in the ensemble window (density, iterates or max steps); the bar shows the progress and a Stop button. When the dynamics change the map is cleared but stays selected, and one click recomputes it.
6.1 Singular curves
Shown with S₁ and S₋₁ in the Layers bar. S₁ (dark) is the set where T is not smooth (it jumps, or DT does), S₋₁ (grey) the same for T⁻¹; S₁ curves fall from left to right, S₋₁ curves rise. Together with the boundary ∂M⁺ = {φ = ±π/2} they are the singular sets that the theory of hyperbolic billiards has to control (growth lemmas, local ergodicity).
Proposition 1 (the curves). Let c ∈ 2ℤ² ∖ {0} be the centre of a lattice disk relative to the current one, α = arg c, and σ ∈ [−1, 1]. The points of M⁺ whose outgoing line meets the disk at c with sin φ′ = σ form the graph
Proof. By the entry formula of section 4, sin φ′ = sin φ − (c × e(ψ))/R with ψ = θ + φ, and c × e(ψ) = |c| sin(ψ − α). The line meets the disk ahead of the exit point iff c · e(ψ) > 0, that is |ψ − α| < π/2; put β = ψ − α. ∎ Since |c| ≥ 2, dθ/dφ = R cos φ / (|c| cos β) − 1 < 0 for R < 2/√5 ≈ 0.89: each Γ is a decreasing graph, as for dispersing billiards.
S₁ is the union of the parts of these graphs on which the disk at c is the first disk the line meets, for the levels
- σ = ±1 (solid): the line is tangent to the disk at c. On one side it enters that disk, on the other it passes and meets a farther one, so T jumps. Always present; they depend on R only.
- σ = 0 (dashed): head-on passages, only if F(π) ∉ πℤ (then ΔΘ(0±) = ±F(π) differ mod 2π, section 2).
- σ = ±cos(ϑ*/2) (dashed): passages with chord angle ϑ* where F jumps, has a kink (F′ jumps or blows up), or stops being finite. The ϑ* are detected numerically: F on 8192 points of [0, π], with second differences far above those three points away (a jump or kink makes them ≈ |[F]| or h·|[F′]| instead of ≈ h²F″; kinks with |[F′]| below about 3·10⁻³ are not seen). The bar lists them.
Proposition 2 (time reversal). I(θ, φ) = (θ − ΔΘ(φ), −φ) is an involution of M⁺, and T⁻¹ = I ∘ T ∘ I. Hence
Proof. I x is the state obtained by undoing the passage that ends at x and reversing the velocity: P⁻¹ takes x to its entry point (θ − ΔΘ(φ), φ) ∈ M⁻, and reversing the velocity there gives an outgoing state with angle −φ. I² = id since ΔΘ is odd. Let y = T⁻¹x. Started at I x, the reversed particle flies back along the flight that led from y to the disk of x and then crosses the disk of y backwards (a radial passage is time reversible), ending at the reversed entry state of that passage, which is I y. So T(I x) = I(T⁻¹x), i.e. T⁻¹ = I T I. The singular set of I T I is I(S₁) together with the singular set of I, which consists of the lines where ΔΘ is not smooth. ∎ These lines are drawn dashed.
Infinite horizon. Far disks are seen only through narrow gaps near the corridor directions, so S₁ consists of infinitely many curves, which accumulate there. Only those of the disks with |c| ≤ D are drawn (by default D = 2: the four nearest disks). Visibility is checked at 240 values of φ per graph, with the ends of the visible pieces found by bisection, so a visible piece shorter than π/240 in φ can be missed. Check: across the midpoint of every drawn tangency piece (R = 0.3, D = 20: 283 pieces), T jumps to a different disk.
6.2 Invariant manifolds of hyperbolic periodic orbits
Definition. Let x₀ be a periodic point of period p whose orbit avoids the singular curves, with DTp(x₀) hyperbolic: eigenvalues μ, 1/μ with |μ| > 1, eigenvectors vu, vs. Its unstable and stable manifolds are
By the stable manifold theorem (for T smooth near the orbit), their local parts are smooth curves through x₀ tangent to vu and vs, and T maps Wu,s(xk) to Wu,s(xk+1). Intuition: points of Wu came from the orbit (they separate from it going forwards), points of Ws go to it; nearby points do neither, and are pushed along Wu and squeezed towards it. Where Wu and Ws cross transversally there are homoclinic points, the starting point of Hopf-chain arguments for local ergodicity; around an island chain, the manifolds of its hyperbolic orbits outline the chain.
In the app. Rest the pointer on a diamond of a hyperbolic periodic orbit (or on its ring) and press ≋ manifolds: through every point of the orbit an arc of Wu (red) and of Ws (blue) is drawn, of total length manifold length (1.5 by default, half on each side, measured in (θ, φ); set in the Periodic orbit settings). Press the button again to hide them. An arc is shorter where it reaches a singular curve: there T jumps, and the local manifold ends.
Computation. The arc x₀ + [−δ, δ]vu (δ = 10−8) is mapped one step at a time, each arm from the orbit point outwards. Where two consecutive image points are more than h = 0.002 apart, the midpoint of their preimages is inserted and mapped (repeatedly; the preimages are close, so linear interpolation is accurate to O(h²·curvature)); where the preimages are within 10−13 and the images are still apart, T jumps (a singular curve) and the arm ends. After each step the arc is re-centred on the orbit point (the projection of xk on it, never the iterate of x₀, which leaves an unstable orbit after about 35/λ steps) and cut to what the next step needs: with e the stretching of the next step along the arc at the orbit point, m·(len/2)/e on each side, the margin m starting at 3 and doubled at a point whose image fell short. So the arc never explodes even when μ is huge (about 1021 for a period-14 orbit of the hard disk), and no point is ever re-iterated from x₀, which would need far more than double precision. The first arc through each xk that reaches len/2 on both sides (or a singular curve) is kept. Ws is the same with T−1 = I∘T∘I (6.1) and vs. Time limit 1.5 s each.
Check. T−1 maps points of the Wu arcs back onto the Wu arcs, and T maps points of the Ws arcs onto the Ws arcs: the distance is about 10−13 (median) and below 5·10−8 for 95 % of the points, for periodic orbits of period 14–29 of the hard disk, a·t with a = 0.45 and θ + a sin θ; each takes 0.1–0.2 s.
7. Focusing, cones and the Lyapunov exponent λT
The Orbit legend button shows the Lyapunov exponent of each orbit (7.4). Before that: when a passage focuses (7.1, 7.2: the shading in the small plots of F and F′ and the focusing panel, 9.5), and when the standard cone argument for hyperbolicity works (7.3: the cone test panel, 9.6).
7.1 Line coordinates and the passage as a lens
Line coordinates. An outgoing ray is an oriented line: its direction ψ = θ + φ and its angular momentum L = R sin φ about the centre of the current disk (L is the signed distance from the centre to the line). The map (θ, φ) ↦ (ψ, L) has Jacobian R cos φ, so
(ψ, L) are canonical coordinates for the invariant measure.
Proposition (T is a composition of two shears). In these coordinates T = 𝒫 ∘ 𝒮, with
𝒫 (passage): (ψ, L) ↦ (ψ + δ(L), L), δ(L) = F(ϑ) − ϑ, ϑ = π − 2 arcsin(|L|/R),
δ extended oddly in L. Here c′ is the centre of the next disk the line hits: the flight keeps the line and only rewrites L relative to the new centre, and all discontinuities of T (which disk is hit next) live in 𝒮. δ = ψout − ψin is the deflection of the velocity, measured from free flight (F = id gives δ ≡ 0, 𝒫 = id). The derivatives are
where ℓ is the distance along the line between the feet of the perpendiculars from c and c′. So DT is a product of two transverse shears, as for the standard map.
Intuition. 𝒫 is an integrable twist map: every line keeps its L and is turned by δ(L). δ′(L) says how strongly the passage fans out the directions of neighbouring parallel lines. Checks: the hard disk (F ≡ 0) has δ′ = 2/(R cos φ), the mirror term of the Sinai billiard; free flight has δ′ = 0.
F alone has no exponent. The twists commute: D𝒫(Ln−1) ⋯ D𝒫(L0) = [[1, Σ δ′(Lk)], [0, 1]], which grows linearly. Exponential growth only comes from the interplay of the passage with the flight.
The passage as a lens. Measured in Jacobi coordinates (transverse offset ξ, slope ζ = dξ/ds) at the entry and the exit point, the passage acts by
(hard disk: −[[1, 0], [2/c, 1]], the mirror; free flight: a flight of length 2c). If F′ ∉ (0, 1), all entries have the same sign, so ±M preserves the cone {ξζ ≥ 0} and the passage disperses like a convex mirror (F′ ≤ 0) or by over-rotating (F′ ≥ 1); Wojtkowski’s cone method then applies as in the Sinai billiard. If 0 < F′ < 1 the passage focuses (F′ = 1/2: M is a quarter turn).
7.2 Focusing share
Call a passage with chord angle ϑ = π − 2|φ| focusing if 0 < F′(ϑ) < 1, and dispersing otherwise (values within 10⁻⁷ of 0 or 1 are the parabolic boundary and count as dispersing). Three shares are compared in the focusing panel of the ensemble analysis:
- orbits: the share of focusing passages along the computed orbits, (1/n) #{k < n : 0 < F′(ϑk) < 1};
- F on [0, π]: |{θ ∈ [0, π] : 0 < F′(θ) < 1}| / π, the proportion of F that focuses (shaded in the small plots of F and F′);
- μ: ν{0 < F′ < 1}, the share for a μ-typical orbit, where ν is the distribution of ϑ under μ,
Indeed, under μ the impact parameter b = L = R sin φ is uniform on (−R, R) (section 3), and ϑ = π − 2 arcsin(|b|/R) gives |b|/R = cos(ϑ/2). By Birkhoff’s theorem, if T is ergodic the orbit share tends to the μ value for μ-a.e. orbit. The orbit share and the proportion of F differ even then, because the billiard does not sample θ uniformly: head-on passages (ϑ near π) are common and grazing ones (ϑ near 0) are rare. For F = θ + a sin θ (0 < a < 1), F focuses on half of [0, π] but on {|sin φ| < sin(π/4)}, about 70.7 % of the passages. An orbit share clearly different from the μ value means an orbit that does not see typical passages: an island, a periodic orbit, a sticky region.
Why not average F′. The mean of F′ along the orbit does not tell focusing from dispersing: passages with F′ = −1 and F′ = 2 are both dispersing but average to 1/2, the most focusing value. The share counts each passage on the correct side. The whole distribution of F′ along the orbits, against that of F and of μ, is the fourth plot of the ensemble analysis (9.5).
F′ is a fourth-order finite difference (h = 10⁻⁴, one-sided within 2h of the ends), with relative error about 10⁻¹¹ where F is smooth.
7.3 Cone test: where the standard hyperbolicity argument works
Jacobi coordinates on M⁺. At x = (θ, φ) ∈ M⁺ a tangent vector (dθ, dφ) moves the outgoing line. Write
ξ is the displacement of the line perpendicular to itself, measured at the exit point, and ζ its turning; at distance s along the line the displacement is ξ + sζ. (The line is {p : p × e(ψ) = L}, L = R sin φ; differentiate this at p = R e(θ) + ξ e(ψ + π/2).)
One step. Let τ be the length of the free flight from x, φ′ the angle of the next passage, c′ = R cos φ′ and u = F′(π − 2|φ′|). In Jacobi coordinates DT(x) is
the flight, then the passage (7.1). The exact Jacobian of the app agrees with this product to about 10⁻¹².
The cone. C = {ξζ ≥ 0}: the displacements that do not shrink along the line, i.e. diverging wavefronts. Its directions are B = ζ/ξ ∈ [0, ∞], the curvature of the wavefront (1/B is the distance back to its focus); free flight acts by B ↦ B/(1 + τB).
Lemma 1. Let A = [[a, b], [c, d]] ∈ SL(2, ℝ) and Q(ξ, ζ) = ξζ, so that C = {Q ≥ 0}.
- (i) A C ⊆ C iff a, b, c, d are all ≥ 0 or all ≤ 0. Then Q(Av) ≥ Q(v) for every v.
- (ii) A(C ∖ {0}) ⊂ int C iff a, b, c, d are all > 0 or all < 0. Then Q(Av) > Q(v) for v ≠ 0, and |tr A| > 2.
Proof. C is the union of the closed first and third quadrants, and A maps the first quadrant onto the closed sector spanned by Ae₁ and Ae₂, of angle < π. This sector lies in C iff both columns lie in the same closed quadrant, first or third: that is (i), and (ii) is the same with open quadrants. With ad − bc = 1, Q(Av) − Q(v) = acξ² + 2bcξζ + bdζ², where ac, bd ≥ 0 and the discriminant is 4bc(bc − ad) = −4bc ≤ 0: the form is positive semi-definite, and definite when all entries are non-zero. If a, b, c, d > 0 then ad = 1 + bc > 1, so a + d ≥ 2√(ad) > 2. ∎
In particular a product that passes test (ii) is never elliptic: no elliptic periodic orbit can pass it.
Proposition 2 (one step). A(x)(C ∖ {0}) ⊂ int C iff
For ½ ≤ u ≤ 1 it fails whatever τ is (for u = 1 C is kept, but not strictly). Proof. The entries of A are 2u − 1, (2u − 1)τ + 2c′u, 2(u − 1)/c′ and 2(u − 1)τ/c′ + 2u − 1. Apply Lemma 1(ii): for u < 0 all are negative; u = 0 gives −1, −τ, −2/c′, −2τ/c′ − 1; for 0 < u < ½ the first, third and fourth are negative, and the second is negative iff (1 − 2u)τ > 2c′u; u = ½ gives a zero entry; for ½ < u < 1 the first is positive and the third negative; u = 1 gives a zero entry; for u > 1 all are positive. ∎ (Also checked numerically on 200 000 random (u, c′, τ).)
Intuition. The flight makes every diverging beam flatter. A passage with 0 < u < ½ is a weak lens: it refocuses only beams whose source is closer than the critical distance 2c′u/(1 − 2u), so a flight longer than that before the passage saves the cone. A passage with ½ ≤ u < 1 is a strong lens: it refocuses even a parallel beam, and no flight helps. (Grouping the passage with the flight that follows it gives the same condition, with the following flight.)
Other cones. The cone test can use any constant cone D = {β₋ ≤ B ≤ β₊}, set in the cone fields under its panel (type a number or inf, or drag the dashed β₋, β₊ handles like any other field; dragging from inf starts at 1000). B lives on the projective line ℝ ∪ {∞}: D is the arc from β₋ to β₊ in increasing B, so β₋ > β₊ means the arc through ∞ (for example 30 ≤ B ≤ −30: the wavefronts whose focus is within 1/30 of the point, in front or behind). In the angle α = arctan B (mod π), D is an arc of length < π, and a matrix with positive determinant preserves the orientation of the projective line, so it maps D onto the arc from the image of β₋ to the image of β₊.
Proposition 2′. (i) For a constant cone D and A ∈ SL(2, ℝ): A(D ∖ {0}) ⊂ int D iff the images A(β₋), A(β₊) lie in the open arc (β₋, β₊), in this order, i.e. the arc between them does not pass through β₋. Equivalently, with W = [u₋ u₊] the matrix of the two edge directions (det W = sin of the arc's angle > 0, D = W·C): iff W⁻¹AW has all four entries non-zero and of one sign (Lemma 1). (ii) For one step A = M(φ′) S(τ) and D = [β₋, β₊] ⊂ [0, ∞], put s± = 1/(τ + 1/β±). Then A(D ∖ {0}) ⊂ int D iff M has no pole in [s₋, s₊], β₋ < M(s₋) and M(s₊) < β₊, where M(B) = (2(u−1)/c′ + (2u−1)B) / ((2u−1) + 2c′uB). Proof. (i) is the orientation argument above, and A maps D = W·C into int D iff W⁻¹AW maps C into int C. For (ii), the flight maps [β₋, β₊] onto [s₋, s₊], and M is increasing away from its pole (2u−1)/(−2c′u). ∎ (Also checked on 300 000 random cases.) For D = C this is Proposition 2.
Intuition. 1/B is the distance to the focus of the wavefront. An upper bound β₊ keeps the virtual focus at least 1/β₊ behind the point, so a weak lens needs only τ + 1/β₊ > 2c′u/(1 − 2u). A lower bound β₋ > 0 keeps the focus within 1/β₋, and then a strong lens (½ < u < 1) leaves the beam diverging iff τ + 1/β₋ < f = c′(2u − 1)/(2(1 − u)), its focal length: the thin-lens rule, by which a source inside the focal length gives a virtual image. A constant cone is a strong restriction, though: near grazing a dispersing passage sends B to about 2/c′ → ∞, so a cone bounded above fails near ∂M⁺, and the map shows where.
Theorem (Wojtkowski 1985). Let T preserve a probability measure μ on a surface, with log⁺‖DT±1‖ ∈ L¹(μ). If there is a measurable family of cones C(x) with DT(x) C(x) ⊆ C(Tx) for μ-a.e. x, and for μ-a.e. x some n ≥ 1 with DTⁿ(x)(C(x) ∖ {0}) ⊂ int C(Tⁿx), then the largest Lyapunov exponent is positive μ-a.e.
Corollary 3 (a criterion from F and R alone). Suppose log⁺|F′| ∈ L¹(ν) and, for Lebesgue-a.e. ϑ ∈ (0, π),
Then λT > 0 μ-a.e. Proof. Every free flight is at least as long as the gap between two disks, τ ≥ 2 − 2R, and c′ = R cos φ′ = R sin(ϑ/2) with ϑ the chord angle of the passage. So by Proposition 2, A(x)(C ∖ {0}) ⊂ int C for μ-a.e. x: the constant family C is invariant, and strictly so after one step. ‖A±1‖ ≤ 2(1 + τ)(1 + 2|u|)(c′ + 2/c′), and log τ, log(1/cos φ′) and (by assumption) log⁺|u| are μ-integrable (τ has finite mean by Santaló’s formula, (4 − πR²)/(2R)), so the Theorem applies with n = 1. The change between Jacobi coordinates and (θ, φ) does not change the exponent, since log cos φ ∈ L¹(μ). ∎
The cone test panel checks this hypothesis on 20 000 values of ϑ distributed by ν and says whether it holds. Example: F = a·t satisfies it iff a ≤ 0, a > 1, or 0 < a ≤ (1 − R)/(2 − R) (≈ 0.41 at R = 0.3). Positive exponents are the first step only. Ergodicity needs a local ergodic theorem (Sinai–Chernov, Liverani–Wojtkowski), whose hypotheses concern the singular curves of 6.1.
Proposition 4 (a rate). Let D be a constant cone with edge matrix W, QD(v) = Q(W⁻¹v), and suppose A(x)(D ∖ {0}) ⊂ int D for μ-a.e. x. With (a, b, c, d) the entries of W⁻¹A(x)W,
which is ∫ log(√(ad) + √(bc)) dμ if T is ergodic. Proof. In the coordinates of W, D = C and QD(Av)/QD(v) = ac t + (ad + bc) + bd/t with t = ξ/ζ > 0, all of a, b, c, d of one sign by Lemma 1; its minimum over t is ad + bc + 2√(abcd) = (√(ad) + √(bc))², and ad = 1 + bc > 1. Since D is invariant, QD(Aⁿv) ≥ ∏ σ(Tkx) QD(v) for v ∈ D, and ‖W⁻¹w‖² ≥ 2QD(w), so ‖Aⁿv‖ grows at least like (∏σ)1/2 up to constants; Birkhoff’s theorem gives the average. ∎ So a cone does not only prove λT > 0, it gives a lower bound, and better cones give larger bounds. Check: hard disk, R = 0.3: λT ≈ 3.78, the bound is 2.56 for C and 3.68 for {|B| ≥ 1}; F = a·t, a = 0.6: λT ≈ 2.75 and {|B| ≥ 3} gives 2.73.
Cone recovery time. When the Corollary does not apply, the panel measures how far the argument is from working:
tried up to max steps, for the chosen cone D (by default D = C). For D = C, k = 1 is Proposition 2 with the true flight instead of the worst case 2 − 2R. If C is invariant (every step passes test (i)), k < ∞ a.e. is exactly the eventual strictness in the Theorem. Where focusing breaks invariance, k is the length of the shortest block that restores the cone. Such blocks are what an argument by an induced map needs: apply the Theorem to the first return to a set on which every return block maps C into C.
Where k is large or infinite. A long hyperbolic product sends every direction except those near the stable direction Es(x) close to the unstable one. If Es(x) lies inside C, the image of C therefore covers almost every direction and cannot fit back inside C. Numerically (θ + a sin θ, a = 0.4, R = 0.45, 3000 μ-random points), 98 % of the points with k > 50 have Es(x) ∈ C. For F = a·t with ½ ≤ a < 1 no point recovered within 50 steps: there the standard cone gives nothing, and another cone family is needed.
7.4 The Lyapunov exponent λT
λT. The largest Lyapunov exponent of the return map along the orbit,
computed by propagating a tangent vector (v₀ = (1, 0) in (θ, φ)) and renormalizing at every step. By Oseledets’ theorem the limit exists for μ-almost every x₀ and almost every v, and it does not depend on the norm. If T is ergodic, the limit is the same for almost every orbit.
The Jacobian is exact. With ψ = θ + φ, c the centre of the next disk relative to the current one, and q = (c · e(ψ))/R, the formulas of section 4 and P give
with φ′ = φ₁ the entry (= exit) angle and ΔΘ′(φ) = −2F′(π − 2|φ|). For free flight 1 + ΔΘ′ = −1. The determinant is cos φ / cos φ′, as measure preservation requires; this, and agreement with finite differences to about 10⁻⁷, were used to check the implementation.
Behaviour.
- In a parabolic system (free flight, F = θ + const) ‖DTⁿ‖ grows linearly, so λT ≈ (log n)/n, which is small and slowly tends to 0.
- λT is large near grazing passages (cos φ′ → 0) and is undefined across discontinuities; these have measure zero.
- Values with |λ| < 10⁻⁹ are shown as 0.
8. Periodic orbits
Search. Rest the pointer on the ring of an orbit on M⁺ for a moment: a “find periodic” button appears next to it; press it. (The Periodic orbit button opens the settings of the search below; the result is shown at the bottom of the M⁺ panel.) Its points x₀, x₁, …, xn−1 (x₀ = where it starts) are used in one of two ways, with distances measured by |Δθ|mod 2π + |Δφ|.
1. Island centre (when the orbit is regular, λT < 10 log n / n). A regular orbit lies on an invariant curve around an elliptic periodic point of some period p₀, and Tp₀ acts on the curve as a rotation by an angle 2πω. So the p₀ sub-orbits xj, xj+p₀, xj+2p₀, … each fill a small closed curve, while for p not a multiple of p₀ the sub-orbits jump between the p₀ islands. For p = 1, …, search up to, the spread sp (mean distance of the sub-orbits of step p to their centroids) is computed; p₀ is the smallest p with sp ≤ 1.5 min s, provided min s < 0.3. The centroids approximate the centre to second order in the size of the curve and are polished as below; the result must lie within 2sp₀ of the first centroid. Why not just the best near-return: on the curve, |xk+mp₀ − xk| ≈ 2πr·dist(mω, ℤ), smallest for the denominators m of the continued fraction of ω, so the best near-returns have length m·p₀ and lead to orbits of the resonant island chains, or, from a poor stretch, anywhere.
From start (from start, on by default). You pick an orbit because it looks periodic, so the search works hard around its start x₀, and every guess contains x₀ itself (the island centre (1) and the near-returns elsewhere (2) are not used). If x₀ is at distance ε from a periodic point of period p, the forward orbit xk = Tkx₀ only follows it while εeλk is small, so for a hyperbolic orbit the stretch x₀, …, xp−1 is a poor guess (closure about εeλp). Going backwards too halves the exponent: with bj = T−jx₀ (T−1 = I∘T∘I, section 6.1), the guess x₀, …, xh, bp−h−1, …, b₁ has a single mismatch |xh − bp−h| of about εeλ max(h, p−h). For each period p (or the fixed period) the guesses are: the two splits h with the smallest mismatch (h = p is the plain stretch), and, while the laps xjp+k, j = 0, 1, …, stay within 0.3 of x₀, their average (at most 200 laps; for x₀ on an invariant curve around an elliptic point this is the point itself). Guesses with mismatch ≤ 0.05 are tried first, shortest period first (the orbit you see is usually the shortest one that nearly closes), then the rest by mismatch; each is polished by multiple shooting with up to 150 iterations, all within 8 s. A solution counts only if its first point lies within min(0.3, max(10⁻³, 2 × mismatch)) of x₀ (2 × the lap spread for a lap average): the periodic point is within ε of x₀ and the mismatch is at least about ε, so this rejects other orbits that merely pass nearby. On orbits that visibly nearly close (some |xp − x₀| < 0.05, p ≤ 30) this found a periodic orbit in 25 of 25 cases for each of the presets rotation, θ + a sin θ, a·t (a = 0.45) and hard disk, in a few ms. Its limit is intrinsic: for a strongly chaotic map a click has to be within about e−λp/2 of the orbit to see it at all. Untick it to use 1 and 2 below.
2. Near-returns (otherwise, or if 1 fails). For each period p (or the fixed period), the stretches xk, …, xk+p are scored by closure |xk+p − xk| plus their distance to x₀, and the 16 best (2 non-overlapping per period, 8 for a fixed period) are polished in order of score, within 5 s. A solution is accepted only if no point moved more than min(0.1, 10 × closure) from its stretch: Levenberg–Marquardt can otherwise travel to an unrelated orbit far away. The message says which way the orbit was found and how far its nearest point is from x₀.
Multiple shooting. For a stretch with period p, the unknowns are all p points, and the residuals are
(θ-components taken mod 2π). The 2p × 2p Jacobian is block-cyclic, with blocks DT(xk) and −I. It is solved by Levenberg–Marquardt: (AᵀA + μ diag AᵀA) δ = −AᵀR, with μ adapted.
Why not Newton on Tᵖ(x) = x? For a hyperbolic orbit DTᵖ has entries of size eλp, and that problem becomes hopelessly ill-conditioned. Multiple shooting only involves single steps.
A solution is accepted when maxk |Rk| < 10⁻¹⁰. The minimal period is then the smallest divisor q of p with |xq − x₀| < 10⁻⁸. A stretch whose residual stops decreasing is abandoned: near-returns do not always have a periodic orbit nearby (for example next to a discontinuity of T). Divisors. Asking for period p, the solver may converge to an orbit whose minimal period q is a proper divisor of p (it then closes up after q steps already, and p = q·m just goes round it m times). By default such an orbit is rejected and the next stretch is tried, so a fixed period p returns an orbit of minimal period exactly p, or says that only divisors were reached. Tick accept divisors to keep them (reported with their minimal period q). In automatic mode every period in the range is searched anyway, so an orbit found from the stretch of length p is always reported with its minimal period.
Locate. Locate in the Periodic orbit settings looks for periodic orbits with the current settings (period or search up to, elliptic only, accept divisors) by itself: from a jittered grid of 24 × 14 starting points over the visible part of M⁺ (in shuffled order, then a second grid offset by half a cell), each followed for 600 iterates and searched “from start” (at most 0.15 s each). Orbits found twice (same period and a common point within 10⁻⁶) count once. It stops after show orbits (5 by default), after both grids, after 25 s, or when you press Stop, and adds the orbits found to the plot (⌘Z / Ctrl+Z removes them). Zoom in on M⁺ to search a smaller region more densely. Example: θ + a sin θ (a = 0.4, R = 0.45), elliptic only, periods ≤ 12: five elliptic orbits (periods 1 and 3) in a few seconds.
Thorough (with elliptic only). thorough starts from informed guesses before the grid. Why they are good: an elliptic orbit (with a twist) is surrounded by an island of invariant curves (Moser), whose orbits are regular, λT ≈ 0; and near it no cone field can be invariant, since DTp is conjugate to a rotation and turns every cone round. So: (1) the λT map (9.4; computed with its ensemble settings if missing) and its regular-looking cells, λP < 5 log P / P (blue under M⁺), most regular first; (2) if that is not enough, the cone with the fewest points that never recover (from the cone search if it is current, otherwise the fixed family of 9.6 is scored now; whatever ranking is chosen there), which is set in the ensemble window, and its cone test map, starting from the cells that never recover (red under M⁺). Fewest “never” is the right criterion here, not most k = 1: by the proposition below every cone's “never” set meets every elliptic orbit, so the smallest one is the most selective set of guesses that is still safe. (Intersecting the “never” sets of several cones would not be: each cone is only guaranteed some point of the orbit, not the same one.) A cone with no “never” point at all on the coarse search grid is passed over when the λT map shows islands, since the grid then simply misses them. Each orbit tried (600 iterates) marks the cells it visits as done, since they lie on the same invariant set, so each island is searched once. (3) To try harder, 3 × 3 points inside each “never” cell, on a grid three times finer with its own marks. Thorough uses no grid elsewhere, because of the following.
Proposition. Let C be any cone field and k(x) ∈ {1, 2, …} ∪ {∞} its recovery time (7.3, 9.6): the least k with DTk(x)C(x) ⊂ int C(Tkx). If x₀ is an elliptic periodic point of period p, then k(xi) = ∞ for at least one point xi of its orbit.
Proof. Suppose k is finite at all p points. Starting at x₀, jump block by block, x ↦ Tk(x)x. The orbit is finite, so some point xa is reached twice, and the composition of the blocks in between is DTN(xa) with N a positive multiple of p. Each block maps the cone strictly inside the next one, so DTN(xa) maps C(xa) into int C(xa), and then |tr DTN(xa)| > 2 (Lemma 1). But DTN(xa) = (DTp(xa))N/p is conjugate to a power of a rotation, so |tr| ≤ 2. □
Intuition: around an elliptic orbit the linearised map turns cones round, so somewhere along the orbit a cone can never be pushed inside itself. Note that it is some point, not all: a single block that is not a whole number of periods can well look hyperbolic. For θ + a sin θ (a = 0.4, R = 0.45) and 14 elliptic orbits of periods 1–8, with the cone 1 ≤ B ≤ −1 and 200 steps, 1 to 4 points of each orbit never recover and the others recover after 2, 7 or 15 steps. So every elliptic orbit passes through the “never” set, and searching from it (with the lap averages of “from start”) reaches the orbit; the red cells can miss it only when the cone test is too coarse for a small island, so raise its density in the ensemble window to look harder. Each search gets up to 0.25 s, the whole run up to 3 minutes; the maps are kept, and can be shown under M⁺ with the Layers bar.
Elliptic only. With elliptic only, a solution that is not elliptic (classification below; parabolic within the tolerance band counts as not elliptic) is rejected like a divisor and the next guess is tried (up to 64 near-returns instead of 16). This cannot be built into the shooting equations: ellipticity, |tr DTᵖ| < 2, is an open inequality, while the solutions of Tᵖx = x are (generically) isolated points, each of which simply is or is not elliptic. An extra equation would make the system overdetermined, and a penalty would only pull the iterate off the solution. So the type selects among the solutions; the guesses decide which solutions are reached. For elliptic orbits the best guesses come from regular orbits: start inside an island (a bright patch of the λT map, 9.4) and, if it fails from the start, untick “from start” to get the island centre.
Classification. Let M = DTq(x₀), the product of the step Jacobians. By section 3, det M = 1, so its eigenvalues solve μ² − (tr M)μ + 1 = 0 and satisfy μ₁μ₂ = 1. The discriminant (tr M)² − 4 decides:
- hyperbolic, |tr M| > 2: real eigenvalues μ, 1/μ with |μ| > 1, and Lyapunov exponent log|μ|/q. If tr M < −2 the eigenvalues are negative and the orbit is called inverse hyperbolic: the unstable direction is reversed every period, so a nearby point jumps to the other side of the orbit each time round (fixed-point index +1 instead of −1). Nearby orbits separate exponentially.
- elliptic, |tr M| < 2: eigenvalues e±2πiω. M is conjugate to a rotation, and ω = arccos(tr M / 2)/(2π) is the rotation number. For a smooth area-preserving map with a non-degenerate twist, Moser’s theorem gives invariant curves around the orbit: an island, so the map is not ergodic. Here this applies if a neighbourhood of the orbit avoids the singularities of T.
- parabolic, |tr M| = 2: eigenvalue ±1 is double and M is ±I or a shear. Perturbations grow linearly. This is the borderline case, and the generic case for F = θ + const, where periodic orbits come in one-parameter families and the solver returns one member.
Because F′ comes from finite differences and the product rounds, |tr M| − 2 is only known to about 10⁻⁸·q·(1 + ‖M‖). Inside that band the orbit is reported as parabolic, and the band is shown.
Numerical instability. A hyperbolic periodic orbit is unstable, and so is its numerical iteration. Starting exactly at it (up to 10⁻¹⁶), the computed orbit leaves it after about ln(10¹⁵)/λ ≈ 34.5/λ iterates. The tool reports this number; the periodic points themselves remain marked.
9. Ensemble analysis
The ensemble tool tests the statistical properties of T with respect to μ: whether typical orbits equidistribute (ergodicity), how fast correlations decay (mixing and its rate), whether the Lyapunov exponent is the same for typical orbits, and whether regular structures such as islands coexist with chaotic regions.
Settings. The window computes two independent samples and two maps on grids (λT map, cone test); each setting sits under the panel it belongs to. Each panel limits the work of one run (for example density × iterates); ensemble limits at the bottom of this help’s index (under technical details) raises these limits ×4 or ×16 (grid densities up to 800 or 1600 cells along θ), for denser and longer runs that take correspondingly longer. Shares are printed with one decimal; 0.0% and 100.0% mean exactly none and all, while a non-zero share that would round to them is shown as <0.1% or >99.9%.
- Long orbits (density, Birkhoff averages, λT): orbits = K starting points, each followed for length = L iterates.
- Correlation pairs: pairs M independent starting points, each followed for max lag iterates; observables f and g.
- λT map: a grid of Gθ × Gs starting points, set by one density Gθ (cells along θ; Gs = 9/16 of it, so the cells look square in the panel; a time estimate appears next to it when a run would take a few seconds or more; it comes from the last run), each followed for iterates = P steps.
- Cone test: the same kind of grid, set by its own density, each cell followed for at most max steps steps.
Panels. There are five panels, fed by four independent computations: the long orbits (density and focusing panels, which share them and their settings), the correlation pairs, the λT map and the cone test. Each panel has its own Run button, a badge with its state, and × to close it; closed panels are listed in the top bar, where one press reopens them (the choice is remembered). The badge says not computed, up to date, or settings changed (computed, but with settings that differ from those now in the inputs; the old result stays visible until it is rerun). A panel’s Run computes its part; when the part is up to date the button reads Rerun and draws new random samples.
Size. Click a panel’s plot to see it large (with Save PNG); drag a panel’s lower edge to make it taller. Both only redraw the stored results at the new size, so nothing is recomputed and nothing is stretched.
Run all (top bar) computes, for the open panels, only the parts that are not up to date and keeps the others, saying which were kept. Shift-click recomputes every open panel with new samples. Each part is stored as soon as it finishes, so Stop keeps the parts already done. f, g and a smaller max lag only change the analysis, so they update at once without rerunning.
Changing the dynamics clears everything. Any change of F or V, a, b, R or max flight discards all results (they belong to another map) and all panels go back to not computed; a run in progress is stopped. Save image saves the open panels that have results, with the summary.
Sampling. K (orbits) initial points are drawn independently from μ: θ uniform on [0, 2π) and sin φ uniform on (−1, 1), which is exactly μ by section 3. Each is iterated L (length) times, so xk = Tkx₀. Since μ is invariant, every xk is again μ-distributed (stationarity), so averages over all K·L points are unbiased estimates of space averages, whether or not T is ergodic. What ergodicity adds is that a single long orbit already gives the space average (Birkhoff). Comparing the K orbits with each other therefore tests ergodicity, and the pooled statistics test the measure. Orbits cut by max flight are shorter, and the summary says so. K·L is capped at 4·10⁶. These long orbits feed the density map, the Birkhoff averages, λT and the focusing plot; the correlations use their own sample (9.2).
9.1 Density on M⁺
The rectangle [0, 2π) × [−1, 1] in (θ, sin φ) is divided into B = 72 × 36 = 2592 bins of equal μ-mass. With Ntot points in total, the expected count per bin is E = Ntot/B. Each bin is coloured by
clipped to ±4: the background colour means consistent with μ, red means over-visited and blue under-visited. The summary gives
How to read it.
- Independent μ-distributed points would give χ²/dof = 1 ± √(2/(B−1)) ≈ 1 ± 0.03 and max |z| ≲ 4–4.5 (the largest of 2592 nearly Gaussian values).
- Consecutive orbit points are correlated, which inflates the fluctuations. Roughly, χ²/dof ≈ 1 + 2Σn≥1 Cbin(n), the integrated autocorrelation time of the bin indicators. A value moderately above 1 that stays put when L grows is normal for a mixing system.
- Structured patterns are the warning sign: blue regions that are never visited (islands or other invariant sets the sampled orbits cannot enter), bands, or deviations that grow with L. Systematic deviations that persist as L grows mean the orbits do not equidistribute with respect to μ.
- Limits: a uniform picture is necessary for ergodicity but not sufficient, and islands smaller than a bin (about 0.087 × 0.056) are invisible here; use the λT map or zoom on M⁺.
9.2 Decay of correlations
Definition. For observables f, g on M⁺,
T is mixing iff Cf,g(n) → 0 for all f, g ∈ L²(μ). The rate for regular (e.g. Hölder) observables is the quantitative statement one proves with Young towers:
- exponential for dispersing billiard maps, with finite or infinite horizon (Chernov 1999; Young 1998), and for soft billiards satisfying suitable hyperbolicity conditions (Bálint–Tóth 2003);
- polynomial, typically ∼1/n, when there are almost-neutral regions, such as stadia and semi-dispersing tables (Markarian 2004; Chernov–Zhang 2005);
- no decay for parabolic or integrable dynamics such as F = θ + const (no mixing, C oscillates).
Lag. The lag is the time shift n in C(n): the number of applications of T between the two observations, g at the starting point x and f at Tⁿx. Lag 0 compares f and g at the same point; lag n asks how much the state n bounces later still “remembers” where it started. max lag is the largest n that is computed and plotted.
Which points are used. M (pairs M) starting points x1, …, xM are drawn independently from μ (θ uniform, sin φ uniform). Each is iterated only up to max lag, giving xi, Txi, …, Tlagxi. For a given lag n the estimate uses exactly the M pairs (xi, Tⁿxi), one per starting point. This is the definition of C(n) taken literally: start at a μ-random point and look n steps later. These points are separate from the K long orbits of the density map.
Estimator.
with f̄n, ḡ the sample means over the M pairs and Var f, Var g the sample variances at the starting points. The normalization makes Ĉ(0) the correlation coefficient of f and g (= 1 if f = g), so different observables can be compared. Starting points whose orbit is cut by max flight before lag n are left out of that lag.
Error bars. The M pairs are independent, so the standard error σn of Ĉ(n) is the sample standard deviation of the M products (f(Tⁿxi) − f̄n)(g(xi) − ḡ), divided by √M and by the same normalization. Roughly σn ≈ 1/√M once the correlation has decayed. Each point carries a ±2σn bar.
The plot.
- log10|Ĉ(n)| is plotted against the lag n. A filled dot means Ĉ > 0, a hollow dot Ĉ < 0.
- Points with |Ĉ(n)| < 2σn are drawn grey: they are statistically indistinguishable from 0, and their sign is noise.
- Exponential decay is a straight line on this plot; a power law n−α is a curve that flattens.
- Oscillating signs with a straight envelope suggest decay with rotation (complex eigenvalues of the transfer operator).
Fits. On the lags n ≥ 1 with |Ĉ(n)| > 3σn (at least 3 are needed):
- the slope of ln|Ĉ| against n gives γ for |C| ∼ e−γn;
- the slope of ln|Ĉ| against ln n gives α for |C| ∼ n−α.
Both are always reported; decide from the shape of the plot which model applies. To see the decay further down, increase M: the error bars shrink like M−1/2, so four times as many pairs halve them, at proportional cost (M × max lag iterations; M × (max lag + 1) is capped at 6·10⁶).
Why independent pairs. One could instead take every pair (xk, xk+n) along a few long orbits. By invariance that is also unbiased, but those pairs overlap and are strongly dependent, so the true error is much larger than it looks, and if T is not ergodic a few orbits only see a few invariant pieces. Independent pairs avoid both problems and give honest error bars.
Choice of observables. The menus f and g offer cos θ, sin θ, cos 2θ, sin φ, cos φ, sin² φ, φ, 1{φ > 0} and cos θ · sin φ. Their space averages are 0 except ∫cos φ dμ = π/4, ∫sin²φ dμ = 1/3 and ∫1{φ>0} dμ = 1/2. Different observables can decay at visibly different speeds: an observable aligned with a slow direction of the dynamics (for example one that depends on the velocity direction ψ when deflections are small) decays slowly even if the system is mixing. f ≠ g measures cross-correlations; Ĉf,g(0) need not be 1.
9.3 Birkhoff averages and λT per orbit
For each of the K orbits the summary lists (1/L) Σk f(xk), to compare with ∫ f dμ.
- If T is ergodic, they all converge to ∫ f dμ. Their spread should be of order √(τ Var f / L), with τ = 1 + 2Σ Cf,f(n) the integrated autocorrelation time.
- Clearly distinct values for different orbits, stable as L grows, indicate orbits confined to different invariant sets: T is not ergodic.
The summary also lists λT for each orbit, with mean and spread. For an ergodic T, Oseledets’ theorem makes the exponent the same for μ-almost every orbit, so the values should agree to within O(L−1/2). One orbit with λT ≈ 0 among others with λT > 0 means it was trapped in a regular region (island). All values ≈ 0 means the system is parabolic or integrable.
9.4 λT map (where are the islands?)
Definition. The starting points are the centres x of the cells of a grid of Gθ × Gs cells of [0, 2π) × [−1, 1] in (θ, sin φ), all of equal μ-mass. For each, a tangent vector v₀ = (1, 0) is followed for P (iterates) steps with the exact Jacobian, renormalized at every step, giving the finite-time Lyapunov exponent
Cells are coloured from the accent colour (λP = 0) to the background (λP ≥ the 99th percentile); cells whose orbit is cut by max flight are grey.
Why it locates islands. On a quasi-periodic orbit (an invariant curve inside an island, or a KAM curve) the map is conjugate to a rotation plus a twist, so ‖DTP‖ grows at most linearly and λP = O(log P / P) → 0. On a chaotic orbit λP → λ > 0 (for an ergodic chaotic component, the same λ for almost every x). So after a few hundred iterates islands stand out as bright patches in a uniform chaotic background. As a working threshold a cell is counted as regular-looking if λP < 5 log P / P (marked “reg” on the colour bar); the summary gives the share of such cells.
Under M⁺. The map can be shown faintly under the Poincaré section with the λT map button of the Layers bar, which also computes it if needed: cells with λP below the threshold are tinted with the accent colour (fading out up to three times the threshold), smoothed, and the rest is left blank. It uses this very computation (no rerun), follows zoom and the φ / sin φ axis, and disappears when the dynamics change.
Limits.
- Islands smaller than a cell (2π/Gθ × 2/Gs in (θ, sin φ)) can be missed; increase the grid or zoom on M⁺ and use the click finder there.
- Sticky chaotic orbits near island boundaries can have small λP for a long time: they look regular at small P. Increasing P separates them.
- Elliptic points that are linearly stable but not surrounded by invariant curves (resonances 1:3, 1:4, or zero twist) give no bright patch.
- Near-grazing passages and long flights give large one-step factors; they slightly raise λP in chaotic regions but do not affect the islands.
To find the periodic orbit at the centre of an island, show it under M⁺, zoom in, start an orbit inside the patch, rest the pointer on its ring and press “find periodic” (section 8).
9.5 Focusing: F′ at the passages under μ, and the orbits on M⁺
For a point x = (θ, φ) of an orbit, F′(ϑ), ϑ = π − 2|φ|, is the derivative of F at the passage that produced it; the passage focuses iff 0 < F′ < 1 (shaded). All curves are fractions per bin on the same bins.
Dashed: F under the invariant measure. F′ depends only on ϑ, so only the φ-part of μ matters. Under μ ∝ cos φ dθ dφ, sin φ is uniform (equivalently the impact parameter b = R sin φ), and |sin φ| = cos(ϑ/2) gives
ν does not depend on F or on the flight (μ is the Liouville measure of the section, preserved by every passage and flight), so F′ under ν and its share ν{0 < F′ < 1} are computed from F alone. It is what a typical orbit sees: by Birkhoff’s theorem, if T is ergodic, the distribution of F′ along μ-almost every orbit tends to it.
Bars: the μ-random long orbits (orbits and length shared with the density panel; Run computes them). Their starts are μ-random, so every point is μ-distributed and the expected histogram is exactly ν, for any T: they check the sampling, and they cannot reveal islands, which are averaged back in with their weight.
Coloured bars: the orbits drawn on M⁺ (live, up to 8, in their colours). For orbit i with points xk, k < N, let νi be the distribution of F′(ϑ(xk)). In every bin, orbit i gets a thin bar from the dashed level to its own fraction νi(bin): up where it has more passages of that kind than a typical orbit, down where it has fewer. The orbits sit side by side inside the bin, never on top of each other. A chaotic orbit of an ergodic T has short bars (finite-N noise). An orbit on an invariant curve inside an island uses a narrow range of angles, so it has tall bars up in a few bins and bars down to zero elsewhere: its passages are of a different kind than the typical ones.
Shares. The plot gives ν{0 < F′ < 1} (“typical orbit”), the share of the μ-random orbits, and for each orbit on M⁺ its focusing share ± 2σ. Consecutive passages are correlated, so σ is estimated by batch means: the orbit is cut into 20 blocks and σ = (standard deviation of the block shares)/√20. An orbit more than 3σ from ν is marked “!”. Typical use: draw an orbit inside an island of the λT map (9.4) and an orbit in the chaotic sea, and compare how much each one focuses with ν. Note that if islands exist, chaotic orbits deviate from ν too, in the opposite direction, since ν averages the islands and the chaotic sea; orbits that stick to island boundaries have correlations longer than a block, and their error bars are then too small.
Uniform in φ (optional, dotted red). The same F′ with the chord angle uniform on [0, π], i.e. φ uniform (ϑ = π − 2φ is affine). It is a picture of F in one particular parametrization (uniform in sin φ gives the dashed curve), corresponds to no invariant measure, and is not a prediction for any orbit.
9.6 Cone test: how many steps until the dispersing cone is restored
Definition. For the centre x of each cell of a grid of Gθ × Gs cells of equal μ-mass in (θ, sin φ) (one density, as for the λT map), the panel shows the cone recovery time k(x) of section 7.3: the number of steps after which the product A(Tk−1x) ⋯ A(x) of the Jacobi matrices maps the cone D = {β₋ ≤ B ≤ β₊} strictly into itself (with W the matrix of the two edge directions of D, D = W·C, and the test is Lemma 1’s sign pattern for W⁻¹PW; entries below 10⁻⁹ times the largest count as 0; the product is renormalized at every step). The default D = {0 ≤ B ≤ ∞} = C is the cone of diverging wavefronts (W = I). β₋ > β₊ gives a cone through ∞. Blank: k = 1. Orange, darker on a log scale: 1 < k ≤ max steps. Red: not within max steps. Grey: cut by max flight.
Summary. The shares of k = 1, of 1 < k ≤ max steps and of “never”, which are μ-shares since the cells have equal mass; the mean of the finite k; and, for D = C and the cells with k > 1, why the first step fails by Proposition 2: a strong lens (½ ≤ F′ < 1), a weak lens (0 < F′ < ½) after a flight shorter than its critical distance, or F′ = 1.
Corollary 3. Under the panel, without a run, the app says whether the criterion of Corollary 3 holds for the current F and R (20 000 values of ϑ distributed by ν; violating shares are given). If it holds, k ≡ 1 and λT > 0 μ-a.e. is proved, not just observed.
Search cones. The Search cones button tries a family of constant cones: the full cone C, cones bounded below (β ≤ B ≤ ∞) or above (0 ≤ B ≤ β), cones through ∞ ({|B| ≥ β} and asymmetric ones), slightly converging ones (−β ≤ B ≤ ∞), the converging cone B ≤ 0, and the cone in the fields. Each is scored on a coarse grid of 48 × 27 equal-mass cells, up to max steps: the share of points where one step already maps it strictly into itself (k = 1), the share that never recovers, the mean of the finite k, and, when k = 1 at every grid point, the exponent bound of Proposition 4 (7.3), λT ≥ the grid average of log(√(ad) + √(bc)). By default (k = 1 first) they are ranked by k = 1, then “never”, then the bound (larger is better), then mean k; with “fewest never” by “never”, then mean k, then k = 1, then the bound. Switching re-sorts the list at once, and then the three best are refined by scaling each finite bound by ½, 1/√2, √2 and 2. The eight best are listed; clicking one puts it in the fields and runs the cone test with it on the full grid. A cone with k = 1 at every point is the hypothesis of Wojtkowski’s theorem with n = 1 (7.3), but only at the grid points: a proof needs the inequality of Proposition 2′ for all u, c′ and τ that occur. Check on the fine grid. The coarse grid only screens: a share of 0.0% there means none of its 1296 points, and a thin “never” region between them would be missed. So the 8 cones shown are scored again on the grid of the cone test (its density, e.g. 160 × 90), and the table shows those shares (hover a row for the counts); it is re-sorted, and any cone that moves into the first 8 is checked too, also after switching the ranking. A row in grey has not been checked yet. 0.0% in the table then means that no point of the cone test grid fails to recover.
Reading it. Blank everywhere: one-step cone argument (if the panel agrees with the Corollary, both say the same). Orange islands of moderate k: the cone is restored after a few steps, so a block (induced-map) version of the argument is plausible there. Large red regions: the standard cone fails there, typically because the stable direction lies inside C (7.3); another cone family is needed. Note that k is about the first block only: a point inside an elliptic island can have k = 1, while over a full period an elliptic periodic orbit never passes the test (Lemma 1: a product that passes it has |tr| > 2). Under M⁺ (Layers bar) cells with 1 < k ≤ max steps are tinted orange, more strongly for larger k, and the cells that never recover are shown in red, more opaque, so they stand out. Show it under M⁺ with the cone test button of the Layers bar, together with the singular curves (6.1), to see where k changes.
9.7 Reading the results together
- Evidence for a hyperbolic, ergodic, exponentially mixing T:
- a density map without structure, with χ²/dof stable in L;
- Birkhoff averages that agree and approach ∫ f dμ;
- λT > 0 and the same for all orbits;
- straight-line decay of |Ĉ| for several observables;
- a λT map without bright patches;
- a cone test with k = 1 almost everywhere, or Corollary 3 satisfied (then hyperbolicity is a theorem);
- and only hyperbolic periodic orbits found.
- Evidence against: blue holes in the density, disagreeing Birkhoff averages or exponents, bright patches in the λT map, elliptic periodic orbits.
- Slow (polynomial) decay with everything else uniform points to almost-neutral regions: near-grazing passages, long flights in corridors, places where F′ ≈ 1.
- What it cannot do. All of this is finite-time numerics. It cannot see islands below the resolution, very long transients, or effects smaller than the noise.
- Shadowing. For a hyperbolic map the computed orbits are pseudo-orbits that leave the true orbit with the same initial point after about 35/λ steps. By the shadowing property, each stays close to some true orbit, and for statistics of typical orbits this is what makes the numerics meaningful.
10. Numerics and precision
- All arithmetic is IEEE 754 double precision.
- Free flights, entry points and the Jacobian of T are exact formulas; the only approximations are F′ (finite differences, relative error about 10⁻¹¹) and, in V(r) mode, the quadrature and table of section 5.
- Beyond the drawn steps, each orbit is moved back to the disk at the origin after every step (the dynamics is invariant under lattice translations), so positions do not lose precision on long orbits.
- Discontinuities of T: flights tangent to a disk, head-on passages when F(π) ∉ πℤ, and passages at the angles where F is not smooth; they are the curves of section 6.1. Orbits through them form a measure-zero set, but nearby orbits separate abruptly there.
- The individual trajectory of a hyperbolic system is reliable only for about ln(10¹⁶)/λT steps; statistics remain meaningful (section 9.7).
11. Expressions
- Operators:
+ − * / ^and parentheses; implicit products such as2pi tora(1 − r/R). - Variables:
t(alsoθ,x) in F,rin V. - Constants:
pi,e,tau, andR(the current radius); parametersa,b(type a value, or drag left/right on the field or its dashed label: Shift for fine steps, Alt for coarse ones; iterates N and drawn steps work the same way). Max flight is shown only with “technical details” (bottom of the help sidebar). - Functions:
sin cos tan asin acos atan atan2 sinh cosh tanh exp log ln sqrt abs sign floor ceil min max pow mod step, withstep(x)= 1 for x ≥ 0 and 0 otherwise, for piecewise potentials. - F is used on [0, π] only; in V(r) mode V is used on (0, R], and a jump at R is allowed.
Presets. One per family, each setting a, b and R to values that show it well (hover a preset to read its description):
- F:
a·t(F′ = a; hard disk at a = 0, free flight at a = 1; a = 0, R = 0.3) ·θ + 2πa(rotation, parabolic; a = golden ratio − 1, R = 0.3) ·θ + a sin θ(deformed free flight with elliptic islands; a = 0.4, R = 0.45) · Snell lens of index b (b = 1.25, R = 0.45, islands). - V: constant
a(refraction; a = −0.28, R = 0.45, islands) ·a(1 − r²/R²)^b(polynomial bump or well; a = 0.3, b = 2, R = 0.3) ·a(1 − (r/R)^b)(steep wall, → hard disk as b → ∞; a = 1, b = 8, R = 0.3) ·−a(1/r − 1/R)(attractive Coulomb; a = 0.1, R = 0.3) ·a(1 − R/r)(repulsive Coulomb with a large disk; a = −0.5, R = 0.9) ·a(1/r² − 1/R²)(inverse square; a = 0.005, R = 0.3).
Snell lens. For V ≡ a on D with a < ½, the speed inside is n = √(1 − 2a), and conservation of L = R sin φ = R n sin φ′ gives the refracted angle φ′; the chord inside subtends π − 2φ′. If sin φ ≥ n there is no transmitted ray and the particle is reflected at ∂D (ΔΘ = 0). With sin φ = cos(θ/2):
which is the F preset with b = n. Checked: it and the V preset a with a = (1 − b²)/2 give the same λT statistics.
12. Save and load
Save writes the session to a .json file; Load restores it. The file holds:
- the scatterer (F or V, exact F), a, b, R, iterates N, drawn steps and max flight;
- the orbits, by their initial conditions (they are recomputed on loading, which gives the same points), with any periodic orbit found for them;
- the views (T² or lattice and its position, φ or sin φ, the zoom on M⁺), inner curves, arrows, keep orbits, the Orbit legend and the periodic-orbit settings;
- the Layers bar, the ensemble settings and which panels are closed;
- the λT map and the cone test, if they were computed for the current dynamics, so they come back without recomputing.
Not saved: the colour theme, and the long orbits and correlation pairs of the ensemble window (large, and quick to recompute with Run). The file is plain JSON, readable by other programs.
13. References
- N. Chernov, R. Markarian, Chaotic Billiards, Math. Surveys and Monographs 127, AMS, 2006.
- V. Donnay, C. Liverani, Potentials on the two-torus for which the Hamiltonian flow is ergodic, Comm. Math. Phys. 135 (1991).
- P. Bálint, I. P. Tóth, Correlation decay in certain soft billiards, Comm. Math. Phys. 243 (2003).
- L.-S. Young, Statistical properties of dynamical systems with some hyperbolicity, Ann. of Math. 147 (1998).
- N. Chernov, Decay of correlations and dispersing billiards, J. Stat. Phys. 94 (1999).
- M. Wojtkowski, Invariant families of cones and Lyapunov exponents, Ergodic Theory Dynam. Systems 5 (1985).
- C. Liverani, M. Wojtkowski, Ergodicity in Hamiltonian systems, Dynamics Reported (N.S.) 4 (1995).
- R. Markarian, Billiards with polynomial decay of correlations, Ergodic Theory Dynam. Systems 24 (2004).
- N. Chernov, H.-K. Zhang, Billiards with polynomial mixing rates, Nonlinearity 18 (2005).
- D. Szász, T. Varjú, Limit laws and recurrence for the planar Lorentz process with infinite horizon, J. Stat. Phys. 129 (2007).
- A. Knauf, Ergodic and topological properties of Coulombic periodic potentials, Comm. Math. Phys. 110 (1987).
- A. Katok, B. Hasselblatt, Introduction to the Modern Theory of Dynamical Systems, CUP, 1995 (Oseledets, shadowing, twist maps).