Specifications

27
will determine where everything is at every point in time. But we need to go through several steps of
definitions and subsequently the system must do some equation solving before everything can fall into its
"right" position. So what to do in the meantime? Well, perhaps you noticed that the UpperArm segment we
originally created with the object inserter has two properties named r0 and Axes0. These two properties
determine the location and orientation of the segment at load time. The r0's are easy because they are
simply three-dimensional coordinates in space. So we can separate the two segments at load time like this:
AnySeg UpperArm = {
r0 = {0, 0.3, 0};
//Axes0 = {{1, 0, 0}, {0, 1, 0}, {0, 0, 1}};
Mass = 2;
Jii = {0.001, 0.01, 0.01};
AnyDrawSeg drw = {};
and
AnySeg ForeArm = {
r0 = {0.3, 0, 0};
Mass = 2.0;
Jii = {0.001,0.01,0.01};
This will clearly separate the segments in your model view:
So far so good. But it might improve the visual impression if the were also oriented a bit like we would
expect an arm to be. This involves the Axes0 property, which is really a rotation matrix. Such matrices are a
bit difficult to cook up on the fly. The predefined version in the UpperArm segment looks like this:
AnySeg UpperArm = {
r0 = {0, 0.3, 0};
Axes0 = {{1, 0, 0}, {0, 1, 0}, {0, 0, 1}};
If your spatial capacity is really good, you can start figuring out unit vectors for the coordinate system
orientation you want and insert them into the Axes0 specification instead of the existing ones. But there is