Re:Modeling a car suspension in Javascript, part 1
by bkanber on Monday September 10, 2012 @02:19PM
(#4501216)
Thanks! This article and the other Physics in JS article mention that we're using Euler only because it's the easiest for a student to understand. The article also mentions that the next post will be dedicated to exploring the different integration solvers.
My guess is that the original commenter just skimmed through the code without reading any of the prose ;)
Basically, don't get hung up over pedantry here. Euler is extremely simple, trivially verifiable and works well in a large number of domains. Demanding everyone who wants to do a simple physics model crack open a textbook is, I think, missing the point.
[1] Fourth order Runge-Kutta integration, a common and reasonably simple algorithm for numeric integration. See: http://en.wikipedia.org/wiki/Runge%E2%80%93Kutta_methods
[2] Euler is the simplest possible integration algorithm most people learn in grade school, essentially: compute your derivatives, multiply by the timestep and add to the current value, and repeat. It falls down and produces wild output when the derivative*timestep product is not small in comparison with the current value.