A neighborhood around pₙ with walls at
pₙ₋₁ and pₙ₊₁.
The ball bounces with acceleration driven by Δ² = (pₙ₊₁−pₙ) − (pₙ−pₙ₋₁).
The "second ratio" is r = Δ² / (pₙ₊₁−pₙ₋₁), shown as a compass needle: 0 down, −1 up, +1 right.
Tip: raise limit if you run out of primes near the chosen start index.
pₙ₋₁
—
pₙ
—
pₙ₊₁
—
span (pₙ₊₁−pₙ₋₁)
—
gₙ₋₁ = (pₙ−pₙ₋₁)
—
gₙ = (pₙ₊₁−pₙ)
—
Δ² = gₙ − gₙ₋₁
—
r = Δ² / (pₙ₊₁−pₙ₋₁)
—
This is intentionally “geography-like”: the same coordinate (index n) always lands on the same neighborhood.
The animation is only a rendering of invariant measurements: gap, second difference, and normalized second ratio.