Electrostatic self-energies of discrete charge distributions on Jordan curves