Vectors and vector commands

The greater-than symbol   >   denotes vectors.
For example, to multiply 2 by the   zero vector   and assign the result, type

   twoTimesZeroVector> = 2 * 0> 
   
MotionGenesis Getting Started Vectors RigidFrame RigidBody
To create right-handed orthogonal unit vectors   Ax>, Ay>, Az>   fixed in a reference frame A, type
Note: For right-handed orthogonal unit vectors   Bx>, By>, Bz>   fixed in a rigid body B, type   RigidBody B
RigidFrame A

Subsequently, other vectors may be defined in terms of   Ax>, Ay>, Az>,   e.g.,

v> = 2*Ax> + 3*Ay> + 4*Az>   
w> = Vector( A, 6, 7, 8 )    % or  w> = 6*Ax> + 7*Ay> + 8*Az>

To multiply the vector   v>   by the scalar 10 and divide by 2, type

vFive> = 10 * v> / 2                  

To add vectors   v>   and   w>,   type

addVW> = v> + w>   

To dot-multiply   v>   with   w>,   type
Note: Since   dotVW   is a scalar, it does not end with the   >   symbol.

dotVW = Dot( v>, w> )          

To cross-multiply   v>   with   w>,   type
Note: Commands may be nested, e.g.,   crossWWV> = Cross( w>, Cross(w>,v>) )

crossVW> = Cross( v>, w> )       

To find the magnitude or magnitude-squared of   v>,   type

magV = GetMagnitude( v> )      
magVSquared = GetMagnitudeSquared( v> )      

To find the unit vector in the direction of   v>,   type

unitV> = GetUnitVector( v> )  

To find radian-measure of the angle between   v> and   w>,   type

angleBetweenVW = GetAngleBetweenVectors( v>, w> )  

To find 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 save input (for subsequent re-use) and/or input and output responses, type
Save   VectorSampleCommands.txt
Save   VectorSampleCommands.all

Exit the program by typing  Quit.


Copyright (c) 1988-2011. All rights reserved.