## IntroductionVerlet integration is a nifty method for numerically integrating the
equations of motion (typically linear, though you can use the same idea
for rotational). It is a finite difference method that's popular with the
Molecular Dynamics people. Actually, it comes in three flavors: the basic
Position, the Leapfrog and the Velocity versions. We will be discussing
the Position Verlet algorithm in this paper. It has the benefit of being
quite stable, especially in the face of enforced boundary conditions
(there is no explicit velocity term with which the position term can get
out of sync). It is also very fast to compute (almost as fast as Euler
integration), and under the right conditions it is 4 The disadvantages of the Verlet method are that it handles changing time steps badly, it is not a self-starter (it requires 2 steps to get going, so initial conditions are crucial), and it is unclear from the formulation how it handles changing accelerations. In this paper we will discuss all of these shortcomings, and see how to minimize their impact. The modified Verlet integrator is referred to as the Time-Corrected Verlet (TCV) and is shown below with its original counterpart. The computations used to generate the graphs for this paper are included in this Excel file. Original Verlet: Time-Corrected Verlet: To see why the TCV is an improvement, we need to see the math behind the original Verlet method. ## MathIn this paper we will be talking exclusively about point masses, which
are acted on by forces. Well, we all know about Newton's little equation:
Most of the graphs presented in this paper include the matching Euler simulation, just for reference. The Euler algorithm is extremely simple, and it will not be derived here. However, the equations are included below for your reference (order is important): v = v + a * dt There is a more accurate version, but it is not strictly the Euler
method, so it will not be used for this paper. However it does give
2 x = x + v * dt + 0.5 * a * dt * dt Please note that there is a faster way to derive the Verlet method's
math* than what will be shown here, however it does not provide the
insight needed to overcome the issues mentioned in the introduction. So
we'll start from a few basic principles: (1) x or (1a) x Now, if we wanted that equation formulated without the velocity term,
we could replace it with some other known state variable, such as the
position x. But since we don't know x (2) x and we can use simple integration to see that: (3) v or (3a) v and we substitute that into equation (2): (4) x or (4a) x For this next step we need to make a big assumption, the importance of
which will be seen later: If we assume that neither the acceleration nor
the time step vary between steps (i.e. that a (5) x or (5a) x You'll notice that the right hand side of equation (5a) is exactly the last half of equation (1), so we can work the modified equation (5a) back into equation (1): (6) x and there you have the traditional Verlet Position integration method. * Hint: remember the central difference 2 |

About Us | Advertise on GameDev.net | Write for us

© 1999-2005
Gamedev.net. All rights reserved. __Terms of Use__
__Privacy
Policy__

Comments? Questions? Feedback? Click
here! GameDev.net is Powered By ISP
Session

GameDev.net^{TM}, the
GameDev.net logo, and GDNet^{TM} are trademarks of GameDev.net,
LLC