Every ring particle is a massless test body integrated under real Newtonian gravity (G = 1 in simulation units) from two sources: the central planet and an orbiting moon.
a = -GM_planet · r / |r|³
-GM_moon · (r - r_moon) / |r - r_moon|³
v(t+dt) = v(t) + a·dt (semi-implicit / leapfrog Euler)
r(t+dt) = r(t) + v(t+dt)·dt
Particles start on circular orbits, v = √(GM/r), so with the moon's mass at zero the ring stays perfectly stable — any drift you see afterward is a direct, measurable consequence of the moon's perturbation, not integration noise.
- Resonance gaps — near orbital radii where a particle's period is a simple fraction of the moon's period (e.g. 2:1, 3:2), repeated close alignments pump up its eccentricity until it is flung out of that radius, opening a gap — the same mechanism behind Saturn's Cassini Division and the asteroid belt's Kirkwood gaps.
- Escaped particles — a particle whose orbit grows past the outer view boundary is removed and counted; the remaining/total readout tracks how much of the ring the moon has cleared out.
- Moon orbit — the moon itself follows a fixed circular Keplerian orbit around the planet, ω = √(GM_planet / r_moon³), and is not perturbed back (test-particle / restricted three-body approximation).