How animals move through their natural habitats is fundamental to understanding their biology. We possess considerable knowledge of Caenorhabditis elegans locomotion and movement behaviour from extensive investigations of these animals living on the 2D surface of an agar plate. However, C. elegans in the wild live in the complex-structured 3D environment of decaying vegetation, and we have very limited information about how C. elegans behaves in their natural habitats. This raises concerns that C. elegans locomotion data collected in 2D may be incomplete and unrepresentative, severely limiting our models and predictions about their neural control, biomechanics and movement. One reason for the gap in our knowledge is the difficulty in recording accurate 3D movements of animals at the scale of C. elegans (~1 mm) with high spatial and temporal resolution. At the macro scale, conventional 3D imaging relies on multiple camera views with overlapping focus regions, but lenses do not have sufficient magnification to image at the C. elegans scale. Conventional microscopes have a very narrow depth of focus so cannot be used in a multiple camera system. Instead, they have to employ Z-stacking to image static bodies in 3D, making them unsuitable for imaging a freely moving body in real-time. To overcome these obstacles, we built a 3D imaging system using three telecentric lenses each with a 7- 21 mm depth of focus (depending on the magnification) attached to three 4.2 megapixel cameras. This system allows us to image the worm moving freely through up to 9.2
cm3. This volume is calibrated using photogrammetry to solve for the lens distortion and camera geometry. A novel image analysis algorithm produces accurate reconstructions of the 3D posture, in the form of a smooth midline, and location of the worm within the volume. We recorded individual worms moving freely through a range of viscoelastic fluids corresponding to different concentrations of gelatine in M9 buffer solution. All recordings were between 25 and 45 Hz. Across a wide range of viscoelasticities, we found that the body postures of the worm are more commonly 3D than 2D. Specifically, we report novel 3D body postures exhibited by C. elegans, including a helicoid locomotion gait and a "lasso" turning posture. Furthermore, the trajectories of the worms are more commonly 3D than 2D. These kinematic and performance data inform a new integrated and 3D neuromechanical locomotion model.