Question about velocity verlet integration

This topic is 4331 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

Recommended Posts

Im Trying to move to velocity verlet integration from Euler, but im somewhat confused on something.. The equations for velocity verlet (I hope): In the last equation for calculation velocity, it wants the force at the next time step; How am I supposed to plug in a force there if the next time step hasnt happened yet?

Share on other sites
If acceleration is a function of only time and position then it's easy. Otherwise I have no idea; maybe you'd need to use a different approach.

Share on other sites
I think that's Leap-frog, not velocity verlet.

f(n+1) is the force for this frame (since you are calculating v(n+1)), and f(n) is the previous frame's force. Just calculate the force first.

Share on other sites
Ah I see, so that would mean f(n) is my force from the previous frame; makes sense

If that is leapfrog, how would I do velocity verlet? Which is actually more accurate: standard verlet, velocity verlet, or leapfrog?

Share on other sites
The different verlets are all pretty good, they just have differnt pros/cons. Velocity verlet better balances the precision between velocity and position. Presonally I like velocity verlet because it gives you an explicit velocity term, which is useful in a number of situations, like collisions (don't let the propoganda for vanilla verlet fool you. You need to explicitly set the velocity after a collision to get correct results, even though the formula uses an implicit velocity term!)

The Theory of Molecular Dynamics Simulations is an excellent article. In general, molecular dynamics simulations seem to be a step ahead of game physics, even though they're doing basically the same thing.

And to save you a step, you'll eventually want to know how to respond to collisions correctly. The coefficient of restitution is an article I wrote to address that (see the "use" section in particular).

• What is your GameDev Story?

In 2019 we are celebrating 20 years of GameDev.net! Share your GameDev Story with us.

(You must login to your GameDev.net account.)

• 10
• 11
• 13
• 9
• 11
• Forum Statistics

• Total Topics
634092
• Total Posts
3015438
×