Application of
Integration Method
RUNGE KUTTA (RK4) method in game physics(NVIDIA
PhysX)
Presented by
Golam Rabby Jewel
ID:142-15-3819
Md. Irteza Rahman
ID:133-15-3057
Outline
Introduction
Short brief to RUNGE KUTTA (RK4)
Real life application RUNGE KUTTA method
Why it is better?
Conclusion
Reference
Introduction
Numerical method is for good solution
Make a program for offloading the work.
Numerical method is for testing.
How much it be wrong
Error analysis
Finding the types of error
RANJE KUTTA (RK4)
Runge kutta RK4 is 4th order differential integration method is a complex integration
It uses in physics.
It calculate the estimation in 4 steps
Real Life Application of RK4 Method
RK4 calculates xn+1 by the following calculation,
xn+1 = xn + 1/6(K1 + 2 * K2 + 2 * K3 +K4) * h
To calculate K1, K2, K3 and K4 the following calculations are needed, please note that
the time step in this equation is represented as ‘h’:
K1 = ODE (t + x)
K2 = ODE (t + 1/2* h, x + 1/2 * K1 * h)
K3 = ODE (t + 1/2 *h, x + 1/2 * K2 * h)
K4 = ODE (t + h, x + K3 * h)
Example
A rocket that is flying through the Earth’s atmosphere. First of all we have the ODE to
calculate the acceleration:
acceleration = (rocket force + force drag) / mass
We know that acceleration is the derivative of velocity (as mentioned earlier) so using
RK4 to calculate this should be relatively straight forward:
Example
K1 = ODE (time + velocity)
K2 = ODE (time + 1/2 * timeElapsed, x + 1/2 * K1 * timeElapsed)
K3 = ODE (time + 1/2 * timeElapsed, x + 1/2 * K2 * timeElapsed)
K4 = ODE (time + timeElapsed, x + K3 * timeElapsed)
And finally, to calculate the acceleration:
accelerationn+1 = accelerationn + 1/6 (K1 + 2 * K2 + 2 * K3 +K4) * timeElapsed
Sniper shot in Battlefield
Why it is Better
This is extremely accurate comparing it with it’s previous solution
 Less risky in real life application
Reduce bug in computer game
Conclusion
RK4 Takes longer and more complex in implementation. But as a reward it gives us
extreme accurate result. Runge Kutta doesn’t end at 4, it can go even further!
Fully depends on the Task and expectation.
Reference
https://en.wikipedia.org/wiki/Runge%E2%80%93Kutta_methods
https://www.quora.com/What-are-the-applications-of-numerical-methods
Bourg, D. M. (2002). Physics for Game Developers. California: O’Reilly
Thank you

Range kutta numerical method techniques

  • 1.
    Application of Integration Method RUNGEKUTTA (RK4) method in game physics(NVIDIA PhysX)
  • 2.
    Presented by Golam RabbyJewel ID:142-15-3819 Md. Irteza Rahman ID:133-15-3057
  • 3.
    Outline Introduction Short brief toRUNGE KUTTA (RK4) Real life application RUNGE KUTTA method Why it is better? Conclusion Reference
  • 4.
    Introduction Numerical method isfor good solution Make a program for offloading the work. Numerical method is for testing. How much it be wrong Error analysis Finding the types of error
  • 5.
    RANJE KUTTA (RK4) Rungekutta RK4 is 4th order differential integration method is a complex integration It uses in physics. It calculate the estimation in 4 steps
  • 6.
    Real Life Applicationof RK4 Method RK4 calculates xn+1 by the following calculation, xn+1 = xn + 1/6(K1 + 2 * K2 + 2 * K3 +K4) * h To calculate K1, K2, K3 and K4 the following calculations are needed, please note that the time step in this equation is represented as ‘h’: K1 = ODE (t + x) K2 = ODE (t + 1/2* h, x + 1/2 * K1 * h) K3 = ODE (t + 1/2 *h, x + 1/2 * K2 * h) K4 = ODE (t + h, x + K3 * h)
  • 7.
    Example A rocket thatis flying through the Earth’s atmosphere. First of all we have the ODE to calculate the acceleration: acceleration = (rocket force + force drag) / mass We know that acceleration is the derivative of velocity (as mentioned earlier) so using RK4 to calculate this should be relatively straight forward:
  • 8.
    Example K1 = ODE(time + velocity) K2 = ODE (time + 1/2 * timeElapsed, x + 1/2 * K1 * timeElapsed) K3 = ODE (time + 1/2 * timeElapsed, x + 1/2 * K2 * timeElapsed) K4 = ODE (time + timeElapsed, x + K3 * timeElapsed) And finally, to calculate the acceleration: accelerationn+1 = accelerationn + 1/6 (K1 + 2 * K2 + 2 * K3 +K4) * timeElapsed Sniper shot in Battlefield
  • 9.
    Why it isBetter This is extremely accurate comparing it with it’s previous solution  Less risky in real life application Reduce bug in computer game
  • 10.
    Conclusion RK4 Takes longerand more complex in implementation. But as a reward it gives us extreme accurate result. Runge Kutta doesn’t end at 4, it can go even further! Fully depends on the Task and expectation.
  • 11.
  • 12.