A system and method for imaging a sample having a complex structure (such as an integrated circuit). The sample is placed on a motion system that moves the sample with respect to an electron beam generator that is used in imaging the sample. The motion system affords thirteen degrees-of-freedom for movement of the sample, by providing a rotation stage, a fine 6-axis piezoelectric-driven stage, and a coarse 6-axis hexapod stage. Various detectors gather information to image the sample. Interferometric and/or capacitive sensors are used to measure the position of the sample and motion system.