If you /want/ a mathematical solution, I have a video showcasing that it is I think you want to do:
(the small green spheres would be the path you want)
Errm, sorry, I don't have the code anymore. As I said in the comments of that video:
Quote: "Basically, I took the cross product between the two unit vectors (the two larger destination spheres), and used that as an axis, then constructed a rotation matrix to rotate about that axis, aaand then calculated euler angles from that matrix. I also used the dot product between the two vectors to figure out how much to turn,"
but that won't help you mch unless you're alright with matrices.
[edit]
in other words, given two /unit/ vectors, A and B, let C=AxB (the cross product of A and B). Given the matrix described here:
http://www.cprogramming.com/tutorial/3d/rotation.html
plugin C's x y and z values for the axis of rotation. Then, take the acos(A.B) (inverse cosine of the dot product of A and B), and plug in an angle to that matrix inbetween 0 and acos(A.B), to get a matrix, R. R*A (matrix*vector), gives you another vector C that lies on the shortest path between A and B.
in a better explained way:
Cross product -> axis
dot product -> angle -> theta ranging from 0 to angle
axis + theta -> matrix
matrix * vector -> result

Tell me if there's a broken link to images in a thread I post, and I'll fix 'em.