2.2 Points, Vectors, and AxesThis section explains the functionality and syntax of Mech's method of defining the basic geometric entities that make up a mechanism model: points, vectors, and axes. A look at the usage statements for most of Mech's functions shows that they take arguments of type point, vector, or axis. In all cases there are several ways to specify a point, vector, or axis, depending on whether the entity is defined in global or local coordinates, is located entirely on a single body, or spans across multiple bodies. The three basic types of Mech geometry objects. 2.2.1 PointsThe most basic geometric entity used by Mech is the point object. Point objects reference the location of a 2D or 3D point in global coordinates or in local coordinates on a specified body. Point objects may be given as 2D or 3D vectors, or they may have the head Point just like the built-in Mathematica graphics primitive. This does not lead to any conflict or require a redefinition of Point because it has no definition by default. The Point head is only used to hold its arguments in Mech, just as it is in standard Mathematica. Any Mech function that calls for a point object accepts either of the following syntax. 2DMethods of defining 2D point objects. 3DMethods of defining 3D point objects. Assuming that the appropriate body object definition has been made, any point on any body can be referenced through either its global coordinates, its local coordinates, or its local coordinate number. The following example shows several point objects that are functionally identical. This loads the Modeler2D package. Local points are defined on the ground body. Here are three identical point specifications. 2.2.2 VectorsThe basic geometric entity specifying direction is the vector object. Vector objects reference the direction of a 2D or 3D vector, in global coordinates or in local coordinates on a specified body. Vector objects may be given as 2D or 3D vectors in global coordinates, or they may have the head Vector and be given in local coordinates on a specific body. A Line can be used to specify a vector object, in which case the direction of the Line is used as the direction of the vector. A Plane (3D only) may also be used to specify a vector object, in which case the normal direction of the Plane is used as the direction of the vector. See the following two subsections for further information on Line and Plane. Any Mech function that calls for a vector object accepts either of the following syntax. 2DMethods of defining 2D vector objects. 3DMethods of defining 3D vector objects. Assuming that the appropriate body object definition has been made, any vector on any body can be referenced through either its global coordinates, its local coordinates, or its local point number. The following example shows several vector objects that are functionally identical. This defines some coordinates on the crank. Here are two identical vector specifications. 2.2.3 LinesThe 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. 2DMethods of defining 2D line objects. 3DMethods 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. 2.2.4 PlanesThe Plane object is used by Modeler3D to reference a planar surface in 3D space. A Plane is defined by three points and has a specific origin, normal direction, and reference direction (see Axis). The first of the three points is the origin, and the vector from the first point to the second point is the reference direction. The third coplanar point cannot be colinear with the first two points. The positive normal is given by the cross product of the vector from the first point to the second point and the vector from the first point to the third point. Because a Plane object possesses the properties of 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. If a Plane object is used to specify direction, the normal direction is used as the direction vector. Any Modeler3D function that calls for a vector or axis object accepts any of the following syntax. 3DMethods of defining plane objects. Assuming that the appropriate body object definition has been made, a plane spanning any one, two, or three bodies can be referenced with a combination of global points, local points, or local point numbers. The following example shows several plane objects that are functionally identical. This loads the Modeler3D package. Local points are defined on the two bodies. Here are two identical plane definitions. Here are three more identical plane definitions. 2.2.5 Axes The axis object is used by Mech to reference an axis in 2D or 3D space. An axis object is specified by origin and direction. Optionally, 3D axis objects may have a reference direction specified. The reference direction is a vector that is not parallel to the direction of the axis. The reference direction is used by some Modeler3D constraints to control rotation about the axis. An axis object may have the head Axis, Line, or Plane. If a Line is used to specify an axis object, the origin and direction of the Line are used as the origin and direction of the axis. Because a Line object has no specific reference direction, a Line should not be used in place of a Modeler3D axis object in a function where the reference direction is relevant. If a Plane is used to specify an axis object, the origin of the Plane is used as the origin of the axis, the normal direction of the Plane is used as the direction of the axis, and the line from point1 to point2 on the Plane is used as the reference direction of the axis. Any Mech function that calls for an axis object accepts any of the following syntax. 2DMethods of defining 2D axis objects. 3DMethods of defining 3D axis objects. Assuming that the appropriate body object definitions have been made, any axis with origin and direction specified with coordinates on a single body or multiple bodies can be referenced with a combination of global points, local points, or local point numbers. The following example shows several axis objects that are functionally identical. This loads the Modeler2D package. Local points are defined on the two bodies. Here are three functionally identical axis definitions. Here are three more identical axis definitions. 2.2.6 The Zeroth PointFor convenience, local point 0 (zero) can be used to reference the local origin of any body, although point 0 is never defined. The zeroth point can always be used, regardless of whether or not any SysBody objects have been defined and passed to SetBodies. The following examples show the use of the zeroth point. 2DHere are two identical 2D point objects. 3DHere are two identical 3D line objects.
|