Thanks for all of your help glebovg, I think I'm on the right track. One thing though: I'd like to be able to express it in terms of the angles \theta and \phi between the two vectors, so there's only one value of \theta and \phi (\rho, too, but that is equal to 1 and won't show up, I believe)...