in reply to Calculate Angle Between Three 3D Points

I'm trying to calculate the angle between three 3D points. The results are not what I expect.

It looks like you're on the right track: prior to normalizing the vectors, translate the vectors such that B is at (0,0,0). But your translation looks wrong. Think @BA instead of @AB, walk through your math again, and see if you can spot the problem.

Replies are listed 'Best First'.
Re: Re: Calculate Angle Between Three 3D Points
by Anonymous Monk on Aug 20, 2003 at 19:22 UTC
    THANK YOU! It works when I reverse @AB into @BA.
    The expected answers for cos(theta) from dot product are now
    -1 to 0, and that is fine with me. Thanks again!