Previous section-----Next section


Vector[bnum, lpnt] is a Mech data object that represents a vector in the local coordinate system of body bnum. The lpnt can be a vector, {x, y} (2D) or {x, y, z} (3D), or a point number (positive integer) referencing coordinates that were defined with SetBodies.

• Any function that takes an vector argument can accept a Vector object, a Line object, or a Plane object (3D) in its place.
• A simple vector {x, y} or {x, y, z} given in place of a Vector object is interpreted as Vector[1, {x, y}] or Vector[1, {x, y, z}].
• See also: Axis, Line, Plane, Point.

Further Examples

Load the Modeler2D package.

The following are all valid vector specifications. The use of Direction serves to show how the vectors are interpreted by MechanicalSystems. First we show vectors in the reference frame of body 1, the ground body.

Here are vectors on body 2. Local point number zero is always defined as {0, 0} so when referenced by a vector it is the zero vector.

After using SetBodies to define some local points, they can be referenced by their indices in a Vector object.

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