Inhomogeneous dielectrics: Conformal mapping and finite-element models