  We give a comprehensive presentation of methods for calculating the Casimir
force to arbitrary accuracy, for any number of objects, arbitrary shapes,
susceptibility functions, and separations. The technique is applicable to
objects immersed in media other than vacuum, to nonzero temperatures, and to
spatial arrangements in which one object is enclosed in another. Our method
combines each object's classical electromagnetic scattering amplitude with
universal translation matrices, which convert between the bases used to
calculate scattering for each object, but are otherwise independent of the
details of the individual objects. This approach, which combines methods of
statistical physics and scattering theory, is well suited to analyze many
diverse phenomena. We illustrate its power and versatility by a number of
examples, which show how the interplay of geometry and material properties
helps to understand and control Casimir forces. We also examine whether
electrodynamic Casimir forces can lead to stable levitation. Neglecting
permeabilities, we prove that any equilibrium position of objects subject to
such forces is unstable if the permittivities of all objects are higher or
lower than that of the enveloping medium; the former being the generic case for
ordinary materials in vacuum.
