# Animation of the trajectory of rigid body motion

Hello Mathematics Community,

I am looking for some advice/references on the following problem regarding animating the trajectory of rigid body motion. I believe this problem will help give better intuition for studying the motion of rigid bodies.

Suppose that we are given the position and orientation of a rigid object in Euclidean space $$(x,y,z)$$ which are represented by the coordinates $$(\boldsymbol{r},\Lambda)$$ respectively. Further, let us assume that the evolution of the position and orientation is governed by an ordinary differential equation of the form $$(\dot{\boldsymbol{r}},\dot{\Lambda}) = f(\boldsymbol{r},\Lambda)$$ where dot's refer to time derivatives $$\frac{d}{dt}$$.

We then can solve this ODE numerically using, say, the Runge-Kutta algorithm. This then gives us a time indexed sequence of vectors and matrices, namely,
$$\boldsymbol{r}_i = \begin{bmatrix}x_i\\y_i \\ z_i \end{bmatrix}$$ for the object's position and

$$\Lambda_i = \begin{bmatrix}\Lambda_{11}^i& \Lambda_{12}^i & \Lambda_{13}^i\\\Lambda_{21}^i& \Lambda_{22}^i & \Lambda_{23}^i\\ \Lambda_{31}^i& \Lambda_{32}^i & \Lambda_{33}^i \end{bmatrix}$$ for it's orientation. If one were to take enough points $$i$$, then this sequence approximates the trajectory of the object (its position and orientation in space) by applying these sets of transformations to a chosen $$(x,y,z)$$ coordinate system.

I would like to animate the trajectory but I need some help/examples as to how to implement. I think a possible solution is as follows:

Step 1: Either solve the ODE in Python and import an array of solution points as a csv file OR set up the problem using C# (I think this is what Blender uses though I am at loss as to how to interface with it), implement Runga-Kutta and get an time indexed array of state-points.

Step 2: Interpolate the missing points to obtain a smooth trajectory.

Step 3: Fix a coordinate system to the animated object

Step 4: Somehow apply coordinate transformations $$(\boldsymbol{r},\Lambda)$$ to the object

Step 5: run the simulation from which we obtain an animation the trajectory of a rigid body in space.

I know how to solve ODE's in Python or MATLAB (Step 1) but I am at a loss as to how to complete steps 2-5. If anyone has any expertise with such a problem or can suggest any reading material/resources that would be greatly appreciated. I am currently attempting to implement this using the Blender software, but if someone knows of more appropriate software for such a problem please feel free to forward your recommendations.Thank you.

• 2.) Most RK methods and all of the usual embedded methods have a "dense output" which is a best polynomial interpolation using the step data. You could of course also just chose the step size small enough that no interpolation is necessary. Commented Oct 10, 2019 at 6:22
• 3) Yes, usually in a scene-building tool an object is constructed in the local coordinates and then 4) translated and rotated to its world coordinates and orientation. 5) Do that for every position and combine them into a movie than you then can play. Simple enough animations can be constructed and updated on-the-fly with a sufficient frame rate, every FPS game does that. Commented Dec 13, 2019 at 23:30