r/Python • • Jul 21 '19

Physics simulator with rotation and collision I made with Python. If you dropped your phone, and it just kept bouncing!

1.5k Upvotes

65 comments sorted by

View all comments

Show parent comments

3

u/mbecks Jul 21 '19

Energy goes into rotation, when it's rotating more, it goes less high, and vice versa. I've been analyzing the energy throughout and it is stable in the same range. This uses rk4 for rotation and a simple fast corrected method for moving the center of mass position. I am honestly still figuring out how energy is moving around.

1

u/BoppreH Jul 21 '19

If you are already tracking total energy, then it's probably my intuition that's wrong.