A structure is any self-contained part that does not have any behavioral control that will be added to the simulation. Some examples of this
are rocks, trees, un-controlled machines like pendulums and so on. Also, there are two special types of structures that can only be added once.
This is the ground surface and the water surface.
Nothing in the simulation can go below the ground surface. Whenever an object tries a restoring force is applied to push it back to the surface.
The water surface must be above the ground surface and it defines the volume where hydrodynamics are applied to objects. When an object is between
the ground and water surface forces of buyancy and drag are applied to those objects.
Both the water and ground surfaces are initially defined as planes. However, the ground surface can be more complex. You can instead specify a
height field array. This is an array that specifies the ground height and the spacing between them points. This allows you to create a more
realistic landscape.
|
Figure 1. How to open the editor for the structure. |
you can have as many structures as you want in your simulation. However, usually what you will want is a population of individual
structures. For example, if you want to look at forest landscape then you will probably want 100 individual trees,
but you do not necessarily want to have to build 100 trees over and over again. AnimatLab has a couple of features that can help with this.
First, you can make a clone of an existing structure. This makes a complete duplicate of the
structure at that time. From that point on the two structures are different though. Changes to one will not
be carried over into the other one. So you could use this to make 100 clones of your tree once you got it to a place you wanted.
However, if you then decided you wanted to change something like
moving one of the limbs you would have to do this for
all 100 clones. A way around this is to use Copies. When you make a copy of a
structure it serves as the base template.
The only configuration files are the ones for the original object. When the simulation is run it simply loads those files in for each copy and changes certain key properties like the location
and name of the structure. Now if you make 100 copies you can make changes to the original template
structure and all of the copies have the same changes. This will only work though if you really
do want all of the trees to have the exact same body plan. This might be a problem if you wanted different types of trees, like oak and walnut, etc.., where each
of these was slightly different. In this case your best bet would be to create templates for each species type, and then make copies of the species templates.
If you have parts that are close together in a structure, especially if they are coupled directly by a joint, can become over-constrained or interfere with each other. In the most basic
case where you have two rigid bodies that are connected by a joint, the joint applies constraints on the movement of the two parts, but if the parts are close together there may
be additional collision constraints applied as well. This causes that joint to be over-constrained and can make it become unstable. To get around this problem all body parts that are
directly connected by a joint have the collision detection between those two parts disabled. If another part hits one of them then the collision is still detected, it is only if those
two parts attempt to collide that the collision is ignored. This way only the joint constraints are applied.
Another situation where collisions can cause problems is when you have a part inside of another part. For example, to build a simulation of a grasshopper leg it is necessary to have a
small movable part inside the femur of each rear leg. These two parts are not directly coupled by a joint, and so their collisions are not automatically disabled. What do you do in this
situation? As soon as the simulation starts it will essentially blow up because you have parts inside of other parts so the physics engine will try and push them apart against their joint
constraints causing a big mess. To get around this problem AnimatLab provides the ability to disable collisions between any two parts within an
structure. When the structure is selected
click on the Collision Exclusion property to open the Collision Exclusion dialog shown in figure 2. Then select the two parts you want to exclude in the drop downs and hit the add button.
To remove an exclusion pair select that pair and hit the remove button. When you are done hit the ok button, or to ignore your changes hit the cancel button.
|
Figure 2. Collision Exclusion Dialog. |
Adding Structures
The easiest way to add a structure is to hit the Add Structure button,
, on the toolbar. There are also buttons to add water,
, and ground,
. In addition, you can also right-click on the Structures node
of the project workspace tree to show the pop-up menu. You can then select the same add items in the pop-up menu. You can remove any structure by selecting it in the project workspace and then
hit the Remove from Workspace button,
, in the toolbar
Structure Properties
X Location of this structure.
Default value: 0 cm
Acceptable range: Any value
Y Location of this structure.
Default value: 0 cm
Acceptable range: Any value
Z Location of this structure.
Default value: 0 cm
Acceptable range: Any value
A read-only property that tells the filename for the body plan editor.
Opens the collision exclusion dialog. See the section on
Collision Exclusions.
The name of this structure.
Default value: Organims_?
Acceptable range: Any string