POV-Ray : Newsgroups : povray.off-topic : I think I did something wrong with RK4... : Re: I think I did something wrong with RK4... Server Time
1 Oct 2024 13:19:26 EDT (-0400)
  Re: I think I did something wrong with RK4...  
From: scott
Date: 13 Apr 2008 04:39:04
Message: <4801c6a8$1@news.povray.org>
> OK, so I did all of that, and I *still* have the problem of the forces in 
> RK4 appearing to be a different scale from the forces using the Newtonian 
> method.
>
> Shouldn't I be able to just swap out the two, choosing Newtonian for 
> speed, or RK4 for accuracy, and see relatively equal* results?

Yes, if your time-step is small enough for Newton to work roughly correctly. 
Do you still get the same difference if you reduce the time step by a factor 
of 100?  If you do, then it's a coding error, if you don't then it's simply 
the fact the Newton is not doing very well at your previous time step 
amount.

Did you try a simple system first, eg constant force or very soft spring 
from one point?  With a constant force you should be able to calculate the 
exact velocity and position by hand and compare with what your algorithm 
gives out.


Post a reply to this message

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