Every story and comment from the Hacker News API, in a layout borrowed from 2001.
A comment on Newtonian Gravity with Velocity Verlet and OpenGL (2016). Parent comment
v <- v + a(x)dt x <- x + vdt
v <- v + a(x)dt/2 x <- x + vdt v <- v + a(x)dt/2
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.
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: