A method of physical analogies, when field lines of two line charges are associated with the trajectories of some two-dimensional mechanical system and equipotentials of the field are associated with the system action, is discussed. Both action and its arbitrary function are orthogonal to particle trajectories simultaneously. This fact can be used to regularize result two-dimensional potential function and to optimize three-dimensional charged particle motion. The method is applied to create charged particle energy analyzer with an ideal focusing in the symmetry plane. The system useful property is that its energy dispersion tends to infinity when the angle between direction to detector and initial velocity tends to π. Also, through some simple examples it was shown that together with the ideal focusing in a plane of symmetry the system has transversal first order focusing for some initial angles.