News for hackers. Stuff that matters.
Re:Newtonian Gravity with Velocity Verlet and OpenGL (2016) by jules on Thursday March 14, 2019 @06:22PM (#19394450)
In Leapfrog we iterate

   v <- v + a(x)dt
   x <- x + vdt
With Euler initialisation this is equivalent to:

   v <- v + a(x)dt/2
   x <- x + vdt
   v <- v + a(x)dt/2
(consider a sequence of steps: we'll have two v <- v + a(x)dt/2 updates next to each other, which gives v <- v + a(x)dt)

This is exactly the same as velocity verlet, if you substitute the value for v computed in the first update into the next two equations:

   x <- x + (v + a(x)dt/2)dt
   v <- (v + a(x_prev)dt/2) + a(x)dt/2

There are no comments on this comment yet.