This 2D companion solves the exact same torque-speed physics as the 3D flagellar-motor model — but instead of rendering the motor's internal parts in 3D, it uses the motor's own solved rotation rate to drive a second, independent simulation: the cell's actual swimming trajectory, viewed from above.
T(ω) = T_stall for ω ≤ ω_knee (plateau)
T(ω) = T_stall·(ω_max − ω)/(ω_max − ω_knee) for ω_knee < ω ≤ ω_max
Load: T_load(ω) = ζ·ω, solved exactly each frame for ω
Top panel: a top-down schematic of the C-ring and stator ring, spinning at the solved rate ω. Bottom panel: run-and-tumble motility — while CCW (run), the flagella bundle co-rotates and the cell swims in a straight line at a speed proportional to ω; when CheY-P triggers a CW switch (tumble) the bundle flies apart, the cell nearly stops translating and its heading randomizes, then the next run sets off in a new direction:
run: x += cos(θ)·v·dt, y += sin(θ)·v·dt (v ∝ ω, straight line)
tumble: θ → θ + Δ (Δ random, roughly uniform) (v ≈ 0, no net translation)
This biased random walk — long straight runs interrupted by reorienting tumbles — is exactly the mechanism E. coli uses for chemotaxis: biasing run duration (not direction) toward favorable conditions turns this random walk into a directed drift. Here CheY-P level sets the tumble rate directly so you can see how a higher switching frequency shortens runs and produces a tighter, more localized random walk, while a low CheY-P level produces long, ballistic-looking excursions.
- Proton-motive force / active stators / load — set the solved rotation rate ω exactly as in the 3D version; ω in turn sets swim speed during runs.
- CheY-P level — sets the auto-switch tumble probability; higher CheY-P means more frequent, shorter runs.
- Path so far / net displacement — the ratio of path length to net displacement is the real experimental signature of run-and-tumble motion: frequent tumbles keep net displacement much smaller than total path length (diffusive), while rare tumbles let net displacement approach total path length (ballistic).