Optimization of Quadripolar Field Production for Electrostatic Ion Beam Focusing