MotionGenesis: F=ma Software, textbooks, training, consulting.      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> 
To create right-handed orthogonal unit vectors   Ax>, Ay>, Az>
fixed in a reference frame A, type
      RigidFrame A
Note: For right-handed orthogonal unit vectors   Bx>, By>, Bz>
fixed in a rigid body B, type   RigidBody B
MotionGenesis Get Started Vectors RigidFrame RigidBody

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

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

To multiply the vector   v>   by 5, type

vFive> = 5 * v>

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 the 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.html

Exit the program by typing  Quit.