POV-Ray : Newsgroups : povray.off-topic : Random stuff : Re: Random stuff Server Time
29 Sep 2024 17:19:57 EDT (-0400)
  Re: Random stuff  
From: scott
Date: 4 May 2009 06:31:26
Message: <49fec3fe@news.povray.org>
> I still don't really comprehend why RK4 is different to just integrating 
> in smaller steps.

RK4 takes into account how the slope of the function changes during the 
step, Euler just assumes it's constant (equal to the value at the beginning 
of the step).  Of course to the "outside" user of such a function there is 
no difference, RK4 just gives a certain level of accuracy or stability for 
much less CPU time than Euler.

> RK4 manages apparently total stability with really quite large integration 
> steps, which is puzzling.

The effect of RK4 over Euler is squared when you are doing it twice (from 
acceleration to velocity, and from velocity to position) so it's not too 
surprising.  Also your forces are smooth and easily predictable for RK4 
(just sums of 1/r^2) so it should perform very well.  Compare to eg a car 
suspension going over rough terrain, there are often sharp changes in forces 
which RK4 (or any other continuous curve predictor) is not so good at.


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.