|
|
|
|
|
by Steuard
5025 days ago
|
|
But for physics, that result is great! An inaccuracy of just one part in 10^12 would be better than practically every physics experiment ever performed. That's like being off by the size of an atom when measuring the distance from LA to New York. (I'm speaking as a physicist rather than as a programmer here, mind you. But my limited experience programming physics would suggest that this is a perfectly acceptable level of error.) |
|
Simulating physics for realsies takes a lot more than that.
The solver algorithm I used is called Euler's method, or ODE1 for short. It's the least accurate numerical ODE solver there is! When people do real physics simulations they use the Runge-Kutta (ODE45) or Adams-Bashforth-Moutlon (ODE113) solves, and they'll have 100,000 steps per second.
So while it's important to be cognizant of these things, it's also best not to stress to much about what's going on in the first of a series of educational articles :)