Help Manual & Tutorial
Version 1.1
Revised
Outline |
Introduction |
Summary |
Format |
Submitting
and Testing |
Tutorial |
This document is meant to be a tutorial that will explain how a data file can be created for the kinematics simulator through a series of increasingly more complex examples. The examples demonstrate a straightforward method that begins with a model or geometrical configuration and ends with a data file for the simulator. The format of the data files is such that it allows the user to have freedom over many aspects of a mechanism and is laid out in a relatively intuitive and clear manner once the user becomes comfortable with the format. This tutorial begins with a brief description of what the simulator does with a data file and what each of the aspects of a data means. In addition, the format of the most general data file is presented followed by a series of examples for clarity. These examples range from the relatively straightforward four bar mechanism to a somewhat complex multi-gear mechanism.
The simulator is essentially a platform that gives the user the ability to manipulate a model of a mechanism. A mechanism can be simply defined as a collection of nodes joined by links and governed by certain constraints. Therefore, a data file that describes such a mechanism must define such nodes, links and constraints. The data file also gives the creator the ability to define messages to display a certain points in the simulation so as to guide the user. The following is the general format for creating a data file for the latest version – version 6:
version_number
number_of_nodes
x y label fixed? trace? collinear? [nodeA nodeB]
constrained? [x y] gear? [buddies
buddy1 direction1 … center]
:
:
number_of_links
nodeA nodeB
label
:
:
number_of_messages
nodeA x_tolerance
y_tolerance x_trigger
y_trigger x_message
y_message message
:
:
The format of the data file may seem somewhat confusing at first, but with the following clarifications it should seem rather understandable. A data file is created by simply opening a text editor such as notepad on a Windows system and writing the file according to the above format. The first line of the file specifies the version number of the data file. This tutorial explains features that require version 6. The reason there needs to be a version number is so that the simulator can be continually enhanced while still being completely backward compatible with more primitive versions of the data file format. After the version number there are three basic sections: the node section, the link section and the message section. The node section begins by specifying the number of nodes in the mechanism. This is followed by one line that defines each of the nodes and this repetition of node definitions is represented above by the vertical periods of ellipsis. Each node line contains all of the information necessary to specify the location, attributes and any constraints of a node. The simulator utilizes a single space as a deliminator between each piece of information in a node line.
The node line begins with the x and y position of the node with origin located in the upper left corner of the simulator space with positive x continuing to the right and positive y continuing straight down from that corner. The simulator space can be set to a wide range of dimensions and the current settings in the x and y directions are 800 and 600 pixels respectively. Note that the locations and distances are completely unitless; all of the current simulations are simply scale models of the Reuleaux Mechanisms that preserve the correct ratio of node locations. Therefore, the creator of the creator of the data file is free to choose the scale of the model. It is important to keep in mind when creating the data file the space that the model can be manipulated in. That is, certain portions of models can be manipulated out of the simulator’s viewing space if the data file creator does not pay close attention to the location of the model and the space limitations of the simulator. The node line continues by labeling the node if desired. The node can be given a single word label (note that it must be limited to one word without spaces) and if no label is desired simply use none as the label and no label will appear. If a label is given, it will be displayed adjacent to the node in the simulator and will follow the node around as the mechanism is manipulated.
What follows the x and y position and the label are five Boolean statements and potentially other defining information for the node. For the Boolean node parameters, the creator of the data file types either true or false (case sensitive) and if true is select parameter, depending on the parameter, further information may be needed to complete the parameter. This will become clear in the following exact descriptions of each of the parameters:
After all of the node lines have been set, it is time to define the connections or links for the nodes which is a significantly easier process. To begin the link section, the first line following the last node line is the number of links’ parameter that determines how many links there are in the model. Following that line are a number (corresponding to the number of link lines’ parameter) of link lines that define the links between nodes in three parameters. The first two parameters define the two nodes that the link joins and the final parameter is a label parameter that gives the data file creator the ability to label links much the same way as nodes can be labeled. Again, recall that nodes are 0th order and that if no label is desired the value of none should be used for that parameter. This is basically all that is required to define the links between nodes and the link lines continue on as indicated by the vertical periods of ellipsis for the number of times defined by the number of links’ parameter.
The final section of the data file gives the creator the opportunity to add messages to the model that will appear at given points in the simulator so as to aid the user and give him further information about certain features of the model. Note that the message section of the data file is the only non-required one. The first parameter that immediately follows the last link line is the number of messages parameter. This parameter defines the total number of messages for the model. This line is followed by a number (corresponding to the number of link lines’ parameter) of message lines that define the parameters of the message. The general concept of a message is such that it allows the data file creator to define a message that will display when a given node is in a given space on the simulator space. For example, the message line can state that when node 0 is in a box 4x4 region around the point (30, 30) the simulator should display the message “Pull me” at point (35, 30). The first parameter defines the node that message is associated with. The next two parameters define the region tolerance that determines when the message is to be displayed. The x and y tolerance define how far in either direction along the respective coordinate directions should the simulator look beyond the trigger point to see if the node is near the trigger point. The next two parameters define the x and y coordinates of the trigger point. The next two parameters define the x and y coordinates of the message. The final parameter defines the message. Note that the message must be enclosed in double quotations. This is because for all previous labels the label was limited to being one continuous word whereas the message parameter allows for multiple words.
Once the data file is completed, it should be saved as a .dat file to indicate to the simulator that this file contains the information for the model. Now, several examples will be given to further clarify the process of creating a data file. The format of the examples will include the picture of the model, the data file and a detailed annotation indicating the significant points of the given data file.
A completed data file can be
tested by uploading the data file to the web server in the location
specified
by the system administrator. To upload
and test a data file, please contact your system administrator for
helping with
submitting and testing the file.
Model:
π 0 double rocker
Data File: pi0doublerocker.dat
6
4
161.53
62.14 A
false false false false false
208.51
45.05 B
false false false
false false
234.47
141.60 C
true false false false
false
174.47
141.07 O
true false false false
false
4
0 1 h
1 2 b
2 3 g
3 0 a
0
Notes:
Model: Peaucellier
Data File: peaucellier.dat
6
6
280.0
280.0 none true false false
false false
517.53
224.23
none false false false
false false
551.91
295.36
none false true false false false
509.74
362.16
none false false false
false false
475.36
291.03
none false false false
false false
380.0
280.0 none
true false false false
false
8
0 1
none
1 2
none
2 3
none
3 4
none
4 5
none
5 0
none
4 1
none
3 0
none
0
Notes:
Model: S 6
Data File: s6.dat
6
5
198
110 none true
false false false
false
82
152 none false
false false false false
120
128 none
false true true 1 3 false false
147
110 none
false false false
false false
152
189 none true
false false false
false
4
0 1
none
1 2
none
2 3
none
3 4
none
0
Notes:
Model: S 4
Data File: s4.dat
6
3
335
185 none
false false false
true 0 1
false
325
155 none
false false false
false false
347
132 none
false false false
true
.8725060159 .4886033689 false
2
0 1
none
1 2
none
0
Notes:
Model: G 2
Data File: g2.dat
6
5
200 200 none true false false
false false
200
164 none
false false false
false true 2 3 -1 4 1 0
280
200 none true
false false false
false
280
156 none
false false false
false true 1 1
-1 2
396
200 none
false false false
false true 1 1
1 2
3
0 1
none
2 3
none
2 4
none
0
Notes:
Model: Simple Planet-Sun Gear
Data File: planetary.dat
6
4
150 150 none true false false
false false
200
150 none
false false false
false true 1 2 -1 0
250
150 none
false false false
false true 1 1
-1 3
225
150 none
false false false
false false
3
0 3
none
0 1
r=50
3 2
r=25
0
Notes:
Model: Cartwright
Data File cartwright.dat
6
7
55 50
none false
true false false true 1 4 -1 5
75
147 none false
false false false false
115
147 none
false true true 1 3 true 0 1 false
155
147 none
false false false
false false
175
50 none false
true false false true 1 0 -1 6
85 50
none true
false false false
false
145
50 none true
false false false
false
6
0 1
none
1 2
none
2 3
none
3 4
none
0 5
none
4 6
none
1
2 20
500 115 147
200 50 "Pull on either of the gears"
Notes: