Previous section-----Next section

Dot
2D/3D

Dot[vector1, vector2] returns the scalar dot product of the direction vectors of the two Mech vector objects.
Dot[..., vector, ...] converts the Mech vector object into a normal Mathematica vector and allows
Dot to proceed normally.

Mech's overloading of the built-in Dot 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]=