The boundary element method (BEM) is used for accurate calculation of electric potentials. The resulting potentials are analyzed in terms of multipole coefficients. Based on these coefficients, trap geometries are optimized and eventual misalignments are evaluated. Full 3D models of quadrupole and 22-pole traps are treated in this work. Improvements of trap geometries for spectroscopic purposes are discussed.