calculating new 3D position on sphere with angular velocity vector

1k Views Asked by At

I feel like this is actually pretty simple but still could not find any solutions so far...

I'm trying to calculate the movement of a point in a rigid rod with the equation
$ \dot P = [ v + \omega \times (P - P_{center} ) ] $ ,
with $ v $ being the translational velocity of the center of the rod $P_{center}$, $ \omega $ the rotational/angular velocity around it and $P$ the position of the point. I derive both velocities from a force and momentum equilibrium ( $ F=m \cdot a $ and $ M = J \cdot \omega $ ).

Neglecting the transitional movement and focusing on the rotation, my question is how to get $P_1$ in a 3D environment after a given time step $\Delta t$ when all vectors are given and in a mutual cartesian coordinate system (x,y,z), especially $\omega$.

Since my simulation is time discrete I cannot simply multiply $\dot P_1$ with $\Delta t$ (which would result in an elongation of the rod). Hence I want to calculate the new position analytically and then reassign the new position to my point. I read a lot about Eulerian angles, but the angles I get from integrating $\omega$ refer to a rotation around fixed axes x,y and z and cannot be used for the Eulerian method (...I think).

Thanks in advance for any help.

2

There are 2 best solutions below

1
On BEST ANSWER

Roughly speaking, you would have to use a procedure as follows. First you need to define the current orientation of your rod (i.e. body) and represent it in some form (quaternions are preferred). Assuming that you choose quaternions you can call the current orientation $q_0$. The problem then is to determine the next orientation after $\Delta t$, which we will call $q_1$. The basic update rule is as follows:

1) Get the quaternion derivative as $\dot{q} = \frac{1}{2}q_0 \omega$ where $\omega$ is in body-fixed coordinates. Also $\omega$ is a quaternion with a real component as 0, and the vector part equal to the components of the angular velocity. In other words $\omega = [0\,\, \omega_x\mathbf{i}\,\, \omega_y\mathbf{j}\,\, \omega_z\mathbf{k}]$

2) Update the quaternion using $q_1 = q_0 + \dot{q}\Delta t$. (or use some other more sophisticated integration technique, i.e. Runge-Kutta).

3) Finally normalize the result $q_1 \leftarrow \frac{q_1}{|q_1|}$

0
On

...it took some time but I found a simple answer :-)

Knowing the angular velocity is sufficient: It points in the direction of the rotation axis and its magnitude multiplied with the time step reveals the angle by which the particle has been rotated around said axis during the timestep. With these two parameters I can calculate a rotation matrix that projects my particle onto its new position. Mathematically speaking:

=> $\vert \vec \omega \vert \cdot \Delta t = \theta $ and $ \frac{\vec \omega}{\vert \vec \omega \vert} = \vec n $
=> the conversion into a matrix can be found on the Wikipedia article on rotation matrices: $ R = Matrix(\vec n, \theta) $

=> $P_1 = R \cdot P_0 $