Previous section-----Next section

2.2.3 Lines

The Line object is used by Mech to reference a line in 2D or 3D space. A Line is defined two points: an origin point and an end point. The two points may be on the same or two different bodies. Because a Line object possesses both direction and location, it can be used in place of a vector object or an axis object in any Mech function that calls for a vector or an axis object.
Line objects have the same head as the built-in Mathematica Line graphics primitive. This does not lead to any conflict or require a redefinition of Line because it has no definition by default. The Line head is only used to hold its arguments in Mech, just as it is in standard Mathematica.
Any Mech function that calls for a vector or axis object accepts any of the following syntax.

2D

Methods of defining 2D line objects.

3D

Methods of defining 3D line objects.

Assuming that the appropriate body object definition has been made, any line spanning bodies or on a single body can be referenced with a combination of global points, local points, or local point numbers. The following example shows several line objects that are functionally identical.

This defines several points on the two bodies.

Here are three identical line definitions.

Here are two more identical line definitions.