Quantum mechanical streamlines. IV. Collision of two spheres with square potential wells or barriers