  A macroscopic theory for the molecular or Casimir interaction of dielectric
materials with arbitrarily shaped surfaces is developed. The interaction is
generated by the quantum and thermal fluctuations of the electromagnetic field
which depend on the dielectric function of the materials. Using a path integral
approach for the electromagnetic gauge field, we derive an effective Gaussian
action which can be used to compute the force between the objects. No
assumptions about the independence of the shape and material dependent
contributions to the interaction are made. In the limiting case of flat
surfaces our approach yields a simple and compact derivation of the Lifshitz
theory for molecular forces. For ideal metals with arbitrarily deformed
surfaces the effective action can be calculated explicitly. For the general
case of deformed dielectric materials the applicability of perturbation theory
and numerical techniques to the evaluation of the force from the effective
action is discussed.
