VectorCross
The VectorCross function requires 2 parameters, each of which must be the name of a vector that has been previously identified with the $Vector or $Vector2D directive.
For 3D vectors, VectorCross returns a vector referred to as a moment that is perpendicular to the plane containing the two vectors provided as parameters and oriented according to the right hand rule. For 2D vectors, VectorCross returns a scalar that represents the signed area of the parallelogram formed by the two vectors (or, equivalently, the magnitude of the vector in the z-direction that would be associated with this cross-product). The units of the vector or scalar that is returned by this function is the product of the units of the two vectors provided as parameters.
For 3D vectors, VectorCross function may be followed by multiplication/division with a scalar or addition/subtraction of a vector. For 2D vectors, only scalar operations are allowable.
Example 1: {3D vectors}
$Vector A B C
A=VectorAssign(3,5,1) [mm]
B=VectorAssign(-4,6,2) [mm]
C=VectorCross(A,B)
{Solution:
A = (3, 5, -1) [mm]
B = (-4, 6, 2) [mm]
C = (4 ,-1-, 38) [(mm)*(mm)]
}
Example 2: {2D vectors}
$Vector2D A B
A=VectorAssign(3,5) [mm]
B=VectorAssign(-4,6) [mm]
C=VectorCross(A,B)
{Solution:
A = (3, 5) [mm]
B = (-4, 6) [mm]
C = 38 [(mm)*(mm)]
}
See also: VectorCross_i