To create sets of right-handed orthogonal unit vectors:
Ax>, Ay>, Az> fixed in a reference frame A, and
Bx>, By>, Bz> fixed in a rigid body B, type
RigidFrame A % Creates Ax>, Ay>, Az>
RigidBody B % Creates Bx>, By>, Bz>
The greater-than symbol
> denotes vectors.
For example,
0> denotes the
zero vector.
Subsequently, other vectors may be defined in terms of these unit vectors, e.g.,
v> = 2*Ax> + 3*Ay> + 4*Az>
w> = 6*Ax> + 7*Ay> + 8*Az> % or w> = Vector( A, 6, 7, 8] )
F> = 3*Bx> + 5*By> + 7*Bz> % or F> = Vector( B, [3, 5, 7] )
To
multiply the vector v> by 5, type
To
add vectors v> and w>, type
To
dot-multiply v> with w>, type
dotVW = Dot( v>, w> ) % dotVW is a scalar so its name does not use >
To
cross-multiply w> with v>
and subsequently form
w> x (w> x v>)
crossWV> = Cross( w>, v> )
crossWWV> = Cross( w>, Cross( w>, v> ) )
To determine the
magnitude
and
magnitude-squared of v>, type
magV = GetMagnitude( v> )
magVSquared = GetMagnitudeSquared( v> )
To form the
unit vector
in the direction of v>, type
unitV> = GetUnitVector( v> )
To find the radian-measure of the
angle
between v> and w>, type
angleBetweenVW = GetAngleBetweenVectors( v>, w> )
To form the
ordinary time-derivative
of the vector
t*v> + sin(t)*w>,
in reference frame A, type
vectorDerivative> = Dt( t*v> + sin(t)*w>, A )
To form a
rotation matrix relating
Bx>, By>, Bz> to
Ax>, Ay>, Az> (in terms of time t), type
B.SetRotationMatrixZ( A, t )
To
express vector v> in terms of
Bx>, By>, Bz>, type
To
express the vector
v> + F> in terms of
Ax>, Ay>, Az>, type
sumInTermsOfAxyz> = Express( v> + F>, A )
To form the
Bx>, By>, Bz>,
measures of w>, type
wMatrix = Vector( B, w> )
To
save commands (for subsequent re-use) or commands/responses, type
Exit the program by typing Quit.