You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Readme.md
+89-18Lines changed: 89 additions & 18 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,44 +1,115 @@
1
1
# Class for calculating Instantaneous Axis of Rotation
2
2
3
-
The `InstantaneousAxisOfRotation` class template will calculate the instantenous axis of rotation between two bodies.
3
+
The instantaneous axis of rotation between two bodies is a useful concept in
4
+
biomechanics. In this post, we will dig into how to calculate the instantaneous
5
+
axis of rotation and show off an AnyScript `class_template` to do this
6
+
calculation and plot the axis between any two reference frames in the AnyBody
7
+
Modeling System.
4
8
5
-
Instantenous axis of rotation are the points fixed to a body undergoing planar movement that has zero velocity at a particular instant of time. At this instant, the velocity vectors of the trajectories of other points in the body generate a circular field around this point which is identical to what is generated by a pure rotation.
9
+
The are several papers that discusses the
10
+
importance of the instantaneous axis of rotation in biomechanics. See for
11
+
example XX and XX. But first, let us look briefly at the math behind.
6
12
7
-
Planar movement of a body is often described using a plane figure moving in a two-dimensional plane. The instant centre is the point in the moving plane around which all other points are rotating at a specific instant of time.
13
+
## 3D Rotations
8
14
9
-
The continuous movement of a plane has an instant centre for every value of the time parameter. This generates a curve called the moving centrode. The points in the fixed plane corresponding to these instant centres form the fixed centrode.
15
+
We can view any displacement of a body in a three-dimensional space as rotation
16
+
around a single axis and a translation along that axis. This gives rise to the
17
+
idea of a screw motion in 3D along what is also called the helical axis. If we
18
+
spit the movement up into infinitesimally small movements each of these will
19
+
have an rotation axis and a linear velocity along that axis. This is the
20
+
instantaneous axis of rotation, and as the name indicate will change direction
If we know the angular and linear velocity of any point on a rigid body, we can
24
+
calculate the properties of the screw motion and the instantaneous axis of
25
+
rotation.
12
26
13
-
Think of rotation as a manifestation of a change in coordinate direction. Affix a coordinate system at _any_ point on a rigid body and it is going to change direction _at the same rate_ regardless of the point location (even at the rotation axis). This is why angular velocity is shared among the entire rigid body.
27
+
From a mathematical point of view the rate of change of a 3x3 rotation matrix
28
+
$R$ is:
14
29
15
-
Mathematically, the rate of change of a 3×3 rotation matrix $R$ is $$\frac{{\rm d}}{{\rm d}t}R = \vec{\omega} \times R$$ where $\vec{\omega}$ is the angular rotation vector, and $\times$ the vector cross product.
For the second part of your question a general rotation _can_ be decomposed into three rotations about three predefined axes (like precession, nutation and spin), or by a single rotation about an arbitrary axis. In either case, the rotation is going to be about a single axis and you need three parameters to specify it exactly. Either three scalar angle speeds about three predefined axes, or two parameters for the rotation axis, and one for the rotation speed magnitude.
32
+
where $\vec{\omega}$ is called the angular velocity vector. This angular
33
+
velocity is quantity shared by all points on the rigid body (including those on
34
+
the rotation axis). Using $\vec{\omega}$ we can write the linear velocity
35
+
$\vec{v}$ of any point at some distance $\vec{r} from the instantaneous axis of
36
+
rotation as:
18
37
19
-
Note also that the general motion of a rigid body is a rotation about some axis in 3D, coupled with a parallel translation along the same axis. The rotation and translation defines a screw in 3D and given the linear and angular velocities of _any_ point on the rigid body, the properties of the motion can be derived.
38
+
$$\vec{v} = \vec{\omega} \times \vec{r}$$ (1)
20
39
21
-
For example, said rigid body has rotational velocity $\vec{\omega}$ and linear velocity $\vec{v}_A$ at some point _A_ with position $\vec{r}_A$ at some instant. The following properties are defined:
40
+
Similarly we can also calculate backwards and find the intantanous axis of
41
+
rotation at some distance $-\vec{r}$ from any point if we know the linear
42
+
velocity of the point and the angular velocity:
22
43
23
-
1. The rotation axis direction is $$\vec{e} = \frac{\vec{\omega}}{|\vec{\omega}|}$$
24
-
2. The rotation magnitude is $$\omega = |\vec{\omega}|$$
25
-
3. The point _C_ on the rotation line closest to the origin is $$\vec{r}_C = \vec{r}_A + \frac{\vec{\omega}\times\vec{v}_A}{\omega^2}$$
26
-
4. The motion pitch (ratio of linear motion to angular motion) is $$ h = \frac{\vec{\omega} \cdot \vec{v}_A}{\omega^2}$$
27
-
5. The linear velocity of point _C_ is $$\vec{v}_C = h\,\vec{\omega}$$
44
+
This is given by:
28
45
29
-
In summary, a single rotation speed, and a linear velocity vector at _some_ point is enough to describe the instantaneous motion of a rigid body both geometrically (rotation line in 3D, pitch and magnitude) and analytically (rigid body transformation of velocity to any other point).
$$ h = \frac{\vec{\omega} \cdot \vec{v}_P}{\vec{\omega}\cdot\vec{\omega}}$$
92
+
93
+
5. The linear velocity at point $C$ along the screw axis is then given by
94
+
95
+
$$\vec{v}_C = h\,\vec{\omega}$$
96
+
97
+
98
+
All we need to know is the rotation velocity of a body and the velocity of any point to find the instantaneous axis of rotation.
99
+
100
+
## AnyScript implementation
101
+
102
+
In AnyScript we can easily find the angular velocity between two reference frames using the class `AnyKinRotational` and the linear velocity using the class `AnyKinLinear`.
103
+
104
+
We have created a custom class_template that makes it easy to add all this code to a model and display the instantaneous axis of rotation. Here is a short example on how to use the class.
105
+
106
+
107
+
The class template is called `InstantaneousAxisOfRotation`. does exactly this, and then calculate the properties listed above.
108
+
109
+
110
+
111
+
112
+
------------------
42
113
43
114
44
115
@@ -47,7 +118,7 @@ In summary, a single rotation speed, and a linear velocity vector at _some_ poin
0 commit comments