Hello folks,
For a cloud or group of particles it is possible to find the global linear state (average position and velocity "as if" the particles were one body) by summing up particle position and velocity multiplied by particle mass and then dividing the sums with global mass. Something like this:
for each particle p
global_position += p->position * p->mass
global_Velocity += p->velocity * p->mass
next p
global_position *= global_inverse_mass
global_velocity *= global_inverse_mass
Is there a similar unambiguous way to determine rotational or angular state for a group of particles? I have managed to determine angular velocity by summing up angular momentum and dividing by global moment of inertia, but I still miss a good way to determine orientation. Simply computing angle as
angle += angular_velocity * time_step
will quickly drift away from the correct value. Thanks in advance!
Cheers,
Mike