A strategy for localized shimming is described, which is noniterating, fast, and reliable. It is shown that the magnetic field measured along a particular projection that runs through the center of a volume element can be separated into the rn contributions from different orders n of the spherical harmonic functions. The selection of a suitable number of projections with distinctive orientations permits unambiguous determination of the coefficients of each spherical harmonic term by combining the results of polynomial regression analysis along the different axes. Shim coils are generally built to generate a field that corresponds to a single spherical harmonic. The measurement of the magnetic field along projections is used to design a rapid shim procedure that uses simple algorithms. The effect of displacing the localized volume is calculated from the representation of the spherical harmonic functions in Cartesian coordinates. The practicality and speed of the resulting method are demonstrated on a 2.35 T 40 cm bore system for the adjustment of the X, Y, Z, Z2, and X2 - Y2 coils. © 1992.