A, Idealized body. The model worm was represented as a point (x, y) located at the center of the border between idealized head and neck regions of the model. The quantity μ is the angle between the instantaneous velocity vector v and the positive x axis. The dorsal (gray) and ventral (black) motor neuron pairs receive out of phase oscillatory input from the body. B, Changes in orientation. Between time steps i−1 and i, the orientation of the velocity vector changes by the turning angle φ. The gray arc is the model worm's path. C, Terminology. Orientation vectors used in the analysis of sinusoidal locomotion. Undulations occur in the x–y plane. The white circles represent the start and end of one locomotion cycle. Solid section of the trajectory represents ventral head sweeps. Dashed section of the trajectory represents dorsal head sweeps.