The direction cosines, A, B, and C, are simply the cosines of the angles, a, b, and g, between a given vector, V = ( vx, vy, vz), and the positive local X, Y, and Z axes.
Note that if V is a unit vector, i.e. |V| = Sqrt[ vx2 + vy2 + vz2 ] = 1, then the direction cosines, A, B, and C, are simply equal to the vector elements, vx, vy, and vz, respectively.
Mathematically, the direction cosines are given by:
Once two direction cosines have been defined, the third is known through the following relationships.
A2 + B2 + C2 = 1 cos2( a ) + cos2( b ) + cos2( g ) = 1
In these two relationships, the direction cosines have been normalized to 1. FRED does not require that the direction cosines be normalized when they are entered in a dialog or macro command, but FRED will normalize them according to these relationships.
|