View Full Version : "Surface" Angle between two Normals on a Sphere...

06-18-2009, 02:36 AM
For some reason I can't make the maths for this work, so I must be missing something. I suspect it is to do with signs..

I have a start point and an end point, which both happen to be Normals on a Unit Sphere...

Assuming that I have an object "walking" on that sphere, and it's orientations are all correct apart from it's "Yaw", i.e The direction it is facing on the sphere, or it's rotation about y in it's own coordinate system, wouldn't the usual Atan2 functions give me this angle?

Or can someone show me the light...
Should I be using some kind of Arc Tangent Path? Although the problem with that is that using Quaternions I get an unpredictable roll angle.. So for my purposes in this particular instance with all that already working, I'd just like a way to obtain my local y rotation if at all possible...

Thanks. :)

06-24-2009, 04:31 PM
If I understand correctly, you want to find angle between two normals on a unit sphere?

And you want to find the difference angle w.r.t Y axis (i.e yaw)?

I would find the direction cosines of both the normals and then find the difference between the angles these normals make to Y axis.

06-24-2009, 07:19 PM
Hmm.. Direction Cosines.. Thanks.. I'll see if that helps. :)

06-25-2009, 08:37 AM
For your reference :