Previous section-----Next section

3.4.3 Example Mechanism Graphics

The quick-return mechanism model that was developed in Section 3.1 is used to demonstrate the Modeler2D graphics functions. The model is redefined as follows in abbreviated form.

The complete quick-return model.

To demonstrate the use of the graphics functions, the image of the quick-return mechanism that was displayed in the preceding sections is built. These images are generated with a mix of Modeler2D graphics functions and built-in Mathematica graphics primitives.

Ground

The ground body of the quick-return mechanism is generated using Modeler2D graphics functions even though it does not move. This is done to take advantage of the easy referencing of local point coordinates that were defined with SetBodies. Note that the Edge function in the following graphic references points either by their {x, y} coordinates or by their local point numbers interchangeably.

Here is the ground body graphic.

The text that is shown with the ground body is generated entirely with the built-in Mathematica Text function.

Here is the ground body graphic annotation.

Here is the result.

Crank

The crank graphic uses only built-in Mathematica graphics functions, with the exception of the Vertex function to plot two local points on the crank, the coordinates of which are defined in a body object. Note the use of the Location function inside of the Disk primitives. This places the disks at the correct global coordinates when the crank moves.

Here is the crank body graphic.

The text that is displayed with the crank graphic also uses the Location function to specify the global coordinates of the text so that the text moves with the crank.

Here is the crank graphic annotation.

Because the coordinates of some of the elements in crankgraphic and cranktext are now functions of Modeler2D dependent variables X2, Y2, and CapitalTheta2, a Modeler2D solution rule must be applied before they can be displayed. Note the use of SolveMech in the following input.

Here is the result.

Drive Arm

The drive arm graphic uses mostly built-in Mathematica graphics functions. Note how the Bar and Vertex function are called using local points 1 and 2, while the Edge function is called with explicit local point coordinates {0, 2} and {0, 8}. Most Mech functions attempt to interpret integers as local point numbers and resolve them into coordinates.

Here is the drive arm graphic.

The text that was displayed with the drive arm graphic also used the Location function to specify the global coordinates of the text so that the text moves with the drive arm.

Here is the drive arm graphic annotation.

Like the crank graphic, the coordinates in the drive arm graphic are functions of Modeler2D dependent variables. Thus, a solution rule must be applied to display the graphic.

Here is the result.

Slider

The slider graphic uses just one built-in Mathematica graphics primitive and one Modeler2D graphics function.

Here is the slider graphic.

Here is the slider annotation.

Here is the result.

Connecting Rod

The connecting rod graphic is nothing more than a line connecting two points on two different bodies.

Here is the connecting rod graphic.

To show the complete quick-return mechanism, all of the graphics objects are combined and displayed subject to a single Modeler2D solution rule.

Here is the complete mechanism at T = 0.15.

Here is the mechanism at T = 0.55.