BKaperick / Fizz-2D

Bare-bones 2D physics engine for handling interactions of rigid convex polygons on a 2D plane.
1 stars 0 forks source link

Numerical instability builds up with rotational motion #4

Open BKaperick opened 5 years ago

BKaperick commented 5 years ago

Even without considering collision mechanics, an object that is moving both translationally and rotationally suffers from consistent deformation as its corners drift away from each other.

This is likely due to some kind of bug or additionally some numerical instability in the rotational updating.

Can currently be seen by setting GLOBALROTSPEED in physics.py to a small constant such as 1.0.

BKaperick commented 5 years ago

In low speed rotations, we see squares degrading into trapezoids, and cyclically returning to their original form. With high speed rotations (on the order of 10 or 100 rotational velocity) we see extreme degradations at each collision event.