  The Casimir force between macroscopic bodies depends strongly on their shape
and orientation. To study this geometry dependence in the case of two deformed
metal plates, we use a path integral quantization of the electromagnetic field
which properly treats the many-body nature of the interaction, going beyond the
commonly used pairwise summation (PWS) of van der Waals forces. For arbitrary
deformations we provide an analytical result for the deformation induced change
in Casimir energy, which is exact to second order in the deformation amplitude.
For the specific case of sinusoidally corrugated plates, we calculate both the
normal and the lateral Casimir forces. The deformation induced change in the
Casimir interaction of a flat and a corrugated plate shows an interesting
crossover as a function of the ratio of the mean platedistance H to the
corrugation length \lambda: For \lambda \ll H we find a slower decay \sim
H^{-4}, compared to the H^{-5} behavior predicted by PWS which we show to be
valid only for \lambda \gg H. The amplitude of the lateral force between two
corrugated plates which are out of registry is shown to have a maximum at an
optimal wavelength of \lambda \approx 2.5 H. With increasing H/\lambda \gtrsim
0.3 the PWS approach becomes a progressively worse description of the lateral
force due to many-body effects. These results may be of relevance for the
design and operation of novel microelectromechanical systems (MEMS) and other
nanoscale devices.
