Previous section-----Next section

Cross
2D/3D

Cross[vector1, vector2] returns the cross product of the direction vectors of the two Mech vector objects.

• In Modeler2D, Cross returns a scalar.
• In Modeler3D, Cross returns a vector.
Mech's overloading of the built-in Cross symbol has no effect on its usage in other Mathematica code.
• See also: Cross, Direction, Dot, Magnitude, SkewSym, Unit.

Further Examples

Load the Modeler2D package.

The cross product of two 2D vectors is defined as a scalar by Mech. This is really the Z component of the cross product {a, b, 0}Cross{c, d, 0}.

Cross can handle Mech vector objects directly, and take advantage of possible simplifications. Consider the cross product of two vectors in the same local reference frame.

In[4]:=
Out[4]=
In[5]:=
Out[5]=
In[6]:=
Out[6]=

Dot can also handle Mech vector objects directly for the same advantage.

In[7]:=
Out[7]=
In[8]:=
Out[8]=
In[9]:=
Out[9]=