A dancer's balance during a step is a weight-transfer problem: the body's center of mass (COM) must move from over one base of support (a foot or pair of feet) to the next, arriving on time with the beat and staying inside the new base of support. This simulator models the COM as a damped second-order system chasing the target foot position:
a = ω²(target − x) − 2ζω·v
v += a·dt
x += v·dt
Here ω (leg stiffness) sets how quickly the legs can redirect the COM — a stiffer, stronger dancer redirects faster — and ζ (balance damping) sets how controlled the arrival is. ζ ≈ 1 is critically damped: the COM arrives at the target with no overshoot, like a well-trained dancer "sticking" the position. ζ well below 1 overshoots and wobbles before settling — a beginner losing balance past the target — and very high ζ makes the movement feel stiff and late.
- Step pattern — box step (front-right-back-left), merengue (side-to-side on every beat) and cha-cha (quick-quick-slow, uneven beat durations) each set a different sequence of target tiles and per-step beat durations.
- Tempo — sets the beat duration in real time (60/BPM seconds per beat), so the same ω, ζ has to keep up with a faster or slower song.
- Timing accuracy — at the instant each beat lands, the simulator checks how far the COM still is from the target tile. Within 0.35 m of the tile centre counts as "perfect", within 0.7 m as "good", further than that is a "miss" — exactly how a rhythm-based dance drill (and a real dance teacher) scores whether a student's weight actually arrived on the beat rather than after it.
Real-world relevance: this is the same weight-transfer/timing model used in dance pedagogy and in motion-capture rhythm training tools — good technique means minimising the position error at every beat, not just moving fast.