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> = 5*Ax> + 0*Ay> + 6*Az> % or w> = Vector( A, 5, 0, 6] )
F> = 0*Bx> + 7*By> + 8*Bz> % or F> = Vector( B, [0, 7, 8] )
To
multiply the vector v> by 5, type
vFive> = 5 * v>
-> vFive> = 10*Ax> + 15*Ay> + 20*Az>
To
add vectors v> and w>, type
addVW> = v> + w>
-> addVW> = 7*Ax> + 3*Ay> + 10*Az>
To
dot-multiply v> with w>, type
dotVW = Dot( v>, w> ) % dotVW is a scalar so its name does not use >
-> dotVW = 34
To
cross-multiply w> with v>
and subsequently form
w> x (w> x v>)
crossWV> = Cross( w>, v> )
-> crossVW> = -18*Ax> - 8*Ay> + 15*Az>
crossWWV> = Cross( w>, Cross( w>, v> ) )
-> crossWWV> = 48*Ax> - 183*Ay> - 40*Az>
To determine the
magnitude
and
magnitude-squared of v>, type
magV = GetMagnitude( v> )
-> magV = 5.385165
magVSquared = GetMagnitudeSquared( v> )
-> magVSquared = 29
To form the
unit vector
in the direction of v>, type
unitV> = GetUnitVector( v> )
-> unitV> = 0.3713907*Ax> + 0.557086*Ay> + 0.7427814*Az>
To find the radian-measure of the
angle
between v> and w>, type
angleBetweenVW = GetAngleBetweenVectors( v>, w> )
-> angleBetweenVW = 0.6294032
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 )
-> vectorDerivative> = (2+5*cos(t))*Ax> + 3*Ay> + (4+6*cos(t))*Az>
To form a
rotation matrix relating
Bx>, By>, Bz> to
Ax>, Ay>, Az> (in terms of time t), type
B.SetRotationMatrixZ( A, t )
-> B_A = [cos(t), sin(t), 0; -sin(t), cos(t), 0; 0, 0, 1]
To
express vector v> in terms of
Bx>, By>, Bz>, type
Express( v>, B )
-> v> = (2*cos(t)+3*sin(t))*Bx> + (3*cos(t)-2*sin(t))*By> + 4*Bz>
To
express the vector
w> + F> in terms of
Ax>, Ay>, Az>, type
addWFInTermsOfAxyz> = Express( w> + F>, A )
-> addWFInTermsOfAxyz> = (5-7*sin(t))*Ax> + 7*cos(t)*Ay> + 14*Az>
To form the
Bx>, By>, Bz>,
measures of w>, type
wMatrix = Vector( B, w> )
-> wMatrix = [5*cos(t); -5*sin(t); 6]
To
save commands (for subsequent re-use) or commands/responses, type
Exit the program by typing Quit.