- #1
squeakywaffle
- 3
- 0
I am just playing around with physics simulation in c++... and my latest obsession is simulating rigid body motion (specifically rotation) with no external torque, for now. The equations of motion in question are the 'Euler equations' which relate the angular acceleration (omega-dot) around any principal axis to the angular velocity around the other two principal axes and the moments of inertia about all three:
http://en.wikipedia.org/wiki/Euler's_equations
So it's a system of coupled differential equations. My question is... does anyone know how to solve a system like this numerically without using some black-box function like NDSolve in Mathematica (I need to be able to implement it in c++)?
Or, if not, does anyone know the method used to solve problems of this kind in video game physics? I suspect that some kind of approximation is used in most cases. My eventual ambition is to write a simple flight simulator, so I don't need extreme accuracy- just the illusion of reality.
I did some quick searches but I couldn't find anything. I would really appreciate it if anyone can shed some light on this.
http://en.wikipedia.org/wiki/Euler's_equations
So it's a system of coupled differential equations. My question is... does anyone know how to solve a system like this numerically without using some black-box function like NDSolve in Mathematica (I need to be able to implement it in c++)?
Or, if not, does anyone know the method used to solve problems of this kind in video game physics? I suspect that some kind of approximation is used in most cases. My eventual ambition is to write a simple flight simulator, so I don't need extreme accuracy- just the illusion of reality.
I did some quick searches but I couldn't find anything. I would really appreciate it if anyone can shed some light on this.