# Rigid body simulation

Under the rigid body dynamics (engl. Rigid-body simulation ) is the continuous or discrete time simulation of the movement of rigid bodies (engl. Rigid-Body ) representing a physical modeling spatially extended objects.

The movement of the bodies is described by ordinary differential equations, for which a solution to an initial value problem must be found in the course of the simulation . The movement consists of translation , rotation and mirroring , whereby no mirroring can occur with a continuous equation of motion.

## Rigid body

A rigid body consists of a set of particles ( mass points ) that have an unchangeable rigid relationship to one another. The state of a rigid body is described by:

Furthermore, the total mass M and the inertia tensor belong to the unchangeable properties of the body. During the simulation, the inertia tensor, which depends on the orientation of the body, has to be calculated. This is done by the following equation: ${\ displaystyle I_ {k}}$ ${\ displaystyle I (t)}$ ${\ displaystyle I (t) = R (t) I_ {k} R (t) ^ {T}}$ The rotation matrix R (t) can be calculated from the orientation Q (t).

## Rigid body motion

The translational and rotational movement of the rigid body is influenced by the following quantities:

• Speed ​​v (t)
• Rotation speed ${\ displaystyle \ omega (t)}$ • Acting linear forces F (t) (forces of movement that act on the object)
• acting torque (rotational forces that act on the object)${\ displaystyle \ tau (t)}$ This allows the following general equation of motion to be defined:

${\ displaystyle {\ frac {d} {dt}} Y = {\ frac {d} {dt}} {\ begin {pmatrix} x (t) \\ R (t) \\ P (t) \\ L (t) \ end {pmatrix}} = {\ begin {pmatrix} v (t) \\\ omega (t) * R (t) \\ F (t) \\\ tau (t) \ end {pmatrix} }}$ , where applies to. ${\ displaystyle \ omega (t) * R (t) = {\ begin {pmatrix} \ omega (t) \ times {\ begin {pmatrix} r_ {xx} \\ r_ {xy} \\ r_ {xz} \ end {pmatrix}} & \ omega (t) \ times {\ begin {pmatrix} r_ {yx} \\ r_ {yy} \\ r_ {yz} \ end {pmatrix}} & \ omega (t) \ times { \ begin {pmatrix} r_ {zx} \\ r_ {zy} \\ r_ {zz} \ end {pmatrix}} \ end {pmatrix}}}$ The solution of the initial value problem of this differential equation has to be solved in the computer simulation by numerical methods such as the Runge-Kutta method .

## Collision detection and response

The collision detection is part of the rigid body simulation in order to be able to locate collisions under rigid bodies and to initiate the corresponding collision responses. Collision responses are usually physical reactions such as an elastic shock that change the motion of the rigid body.