Electrostatic force between a charged sphere and a planar surface: a general solution for dielectric materials.