RE: [Algorithms] physics integrators
Brought to you by:
vexxed72
From: Idahosa E. <ida...@ms...> - 2001-01-04 20:10:36
|
Well all I want is simple projectile motion so Euler integration works just fine. I am only curious about Runge-Kutta. Idaho -----Original Message----- From: gda...@li... [mailto:gda...@li...]On Behalf Of Graham Rhodes Sent: Thursday, January 04, 2001 9:10 AM To: gda...@li... Subject: RE: [Algorithms] physics integrators Idaho, Read Jeff Lander's response for some good advice----I'd follow his approach if your system meets the conditions he states in his first sentence. If you cannot do this, you need to be aware that the simple explicit Euler integration (what most people mean by Euler integration) will be unstable if you have any springs, no matter how weak or strong, or if your system otherwise exhibits natural oscillatory behavior such as with magnets. In this case, you will need to use something more sophisticated, and the predictor-corrector methods that Jeff suggests are more straightforward than Runge-Kutta. Euler may appear okay with very small time steps, but the integration will eventually decay and blow up unless you halt the simulation prematurely. This instability is the reason more sophisticated integrators are eventually used for nontrivial problems. I'd hate for you to become frustrated if your simulation doesn't work with the simple Euler method. The math for that method just doesn't admit oscillations and there's nothing you can do about it except switch methods. (Plug: attend my talk at GDC 2001 to find out why.) Graham Rhodes -----Original Message----- From: gda...@li... [mailto:gda...@li...]On Behalf Of Idahosa Edokpayi Sent: Wednesday, January 03, 2001 11:24 PM To: gda...@li... Subject: [Algorithms] physics integrators I realize that using fourth order Runge-Kutta methods for my particular particle system project is probably overkill and I'll probably just use Euler integration now, but I am curious as it was mentioned in the siggraph notes someone was so kid to link me to earlier. I understand the principles and I can do the math. (I think :) ) But I have two questions. Ki is supposed to be dependent on Ki-1. Well for computing position this is a little difficult because velocity is independent of the previous position (at least it will be in my particle system). How does Ki-1 factor into Ki if Velocity (which would be F(x,t) in my situation I believe) only needs time? My second question is: Is Runge-Kutta even valid if F( x, t ) is constant? If I am doing projectile motion and I am trying to find velocity and accelaration is a constant and or independent of time (changing t and x in F(x,t) makes no difference) can I still use Runge-Kutta? How? Are there any examples I can look at? Idaho _______________________________________________ GDAlgorithms-list mailing list GDA...@li... http://lists.sourceforge.net/mailman/listinfo/gdalgorithms-list _______________________________________________ GDAlgorithms-list mailing list GDA...@li... http://lists.sourceforge.net/mailman/listinfo/gdalgorithms-list |