Soundtrack Central The best classic game music and more

    Pages: 1

avatar! Feb 23, 2009

I just wrote some (simple) code to integrate a second order differential equation. The technique I used is Verlet integration. Turns out it's often used in video games! I thought that was cool smile

Although I have to say, I don't think anything can really beat a 4th order Runge–Kutta with adaptive timestep... which mind you is much much harder to program. Thought I would share!

cheers,

-avatar!

Jodo Kast Feb 24, 2009

avatar! wrote:

I just wrote some (simple) code to integrate a second order differential equation. The technique I used is Verlet integration. Turns out it's often used in video games! I thought that was cool smile

Although I have to say, I don't think anything can really beat a 4th order Runge–Kutta with adaptive timestep... which mind you is much much harder to program. Thought I would share!

cheers,

-avatar!

I know what a second order differential equation is - something with menacingly difficult algebra and laughably easy calculus. It's been exactly 10 years since I've solved one and that's all I remember. Just a tad of calculus and pages of algebra. In fact, I told my classmates at the time that we were taking Real Advanced Algebra.

Never heard of Verlet integration, although I would imagine someone named Verlet is the culprit.

Zorbfish Feb 24, 2009

Code in Matlab I presume? Last time I messed around with integration was in a data modeling and simulation class back in college. Used Verlet to simulate a double jointed pendulum and Runge-Kutta for a simple molecular dynamics model. Hooray for nerdiness. tongue

avatar! Feb 24, 2009

Zorbfish wrote:

Code in Matlab I presume? Last time I messed around with integration was in a data modeling and simulation class back in college. Used Verlet to simulate a double jointed pendulum and Runge-Kutta for a simple molecular dynamics model. Hooray for nerdiness. tongue

I'm doing this for a class project, and we're not allowed to use either Matlab, Mathematica, or any program that can do everything for you quickly and painlessly. I wrote it in C++, and to be honest it was pretty quick and painless to write anyway smile

cheers,

-avatar!

    Pages: 1

Board footer

Forums powered by FluxBB