Previous section-----Next section

Direction
2D/3D

Direction[vector] returns the direction vector of vector in global coordinates.
Direction[axis] returns the direction vector of the specified axis.
vector may be a simple vector or a Mech vector object with head
Vector, Line, or Plane (3D).

Direction[bnum, lpnt] is interpreted as Direction[Vector[bnum, lpnt]].
• Other Direction[args, ... ] instances are interpreted as Direction[Line[args]].
Mech's overloading of the built-in Direction symbol has no effect on its usage in other Mathematica code.
• See also:
Angle, Location, Magnitude, Unit.

Further Examples

Load the Modeler2D package.

Direction returns the direction vector of any Mech geometry object that has the property of having a direction.

Magnitude returns the length of the direction vector of a Mech vector object, taking advantage of some simplifications.

Similarly, Unit takes advantage of the fact that the magnitude of the vector is not a function of the coordinate system that the vector is expressed in. If the vector is already expressed in global coordinates, then such simplifications are not possible.


Any questions about topics on this page? Click here to get an individual response.Buy NowMore Information