vectormath
Perform math on given vector data sets.
vectormath vec1 <vecname1> vec2 <vecname2> [out <filename>] [norm] [name <setname>] [ dotproduct | dotangle | crossproduct ]
vec1 <vecname1> vec2 <vecname2>
Vector(s) on which to operate.
[out <filename>]
Name of file to write output to.
[dotproduct]
(Default) Calculate the dot-product of the two vectors.
[dotangle]
Calculate angle from dot-product between the two vectors; vectors will be normalized.
[crossproduct]
Calculate cross-product of the two vectors.
[norm]
Normalize the vectors; this will affect any subsequent calculations with the vectors. This is turned on automatically if dotangle
specified.
Calculate dot product, angle from dot product (degrees), or cross product for specified vectors. Note that norm normalizes the vectors themselves; the vectors will remain normalized for subsequent calculations or output. Either vec1 or vec2 can be of size 1; in that case each vector in the set with N frames operates on the single vector. For example, if vec1 is size N and vec2 is size 1, then each frame of vec1 is operated on the single vector from vec2.
For example, to get the angles between two previously calculated vectors v1 and v2:
vectormath vec1 v1 vec2 v2 dotangle out dotproduct.dat name acos(|V1|*|V2|)