- #1
The-Mad-Lisper
- 12
- 1
In an excerpt from Ian Millington's Game Physics Engine Development, the author mentions a "damping" force:
"In our physics engine we could simply assume that there are no forces at work and use [Newton's First Law] directly. To simulate drag we could add special drag forces. This is fine for the simple engine we are building in this part of the book, but it can cause problems with complex systems. The problem arises because the processor that performs the physics calculations isn't completely accurate. This inaccuracy can lead to objects getting faster of their own accord.
A better solution is to incorporate a rough approximation of drag directly into the engine. This allows us to make sure objects aren't being accelerated by numerical inaccuracy, and it can allow us to simulate some kinds of drag. If we need complicated drag (such as aerodynamic drag in a flight simulator or racing game), we can still do it the long way by creating a special drag force. We call the simple form of drag 'damping' to avoid confusion."
He later mentions something along the lines that damping helps conserve energy of the system, but doesn't go into any specifics. How exactly does damping solve numerical inaccuracy when rounding errors do not necessarily cause an increase in a particle's speed? How does it conserve energy?
"In our physics engine we could simply assume that there are no forces at work and use [Newton's First Law] directly. To simulate drag we could add special drag forces. This is fine for the simple engine we are building in this part of the book, but it can cause problems with complex systems. The problem arises because the processor that performs the physics calculations isn't completely accurate. This inaccuracy can lead to objects getting faster of their own accord.
A better solution is to incorporate a rough approximation of drag directly into the engine. This allows us to make sure objects aren't being accelerated by numerical inaccuracy, and it can allow us to simulate some kinds of drag. If we need complicated drag (such as aerodynamic drag in a flight simulator or racing game), we can still do it the long way by creating a special drag force. We call the simple form of drag 'damping' to avoid confusion."
He later mentions something along the lines that damping helps conserve energy of the system, but doesn't go into any specifics. How exactly does damping solve numerical inaccuracy when rounding errors do not necessarily cause an increase in a particle's speed? How does it conserve energy?