POV-Ray : Newsgroups : povray.off-topic : Still random : Re: Still random Server Time
29 Sep 2024 19:20:08 EDT (-0400)
  Re: Still random  
From: Invisible
Date: 8 May 2009 07:09:59
Message: <4a041307$1@news.povray.org>
> I think the key point is that most 
> things have a force that acts in the opposite direction of the movement, 
> which usually keeps things stable and also produces the oscillations.

Yeah.

Of course, the fun part happens when objects hit each other. Then you 
have a sudden and drastic change in the forces applied. Good luck 
integrating that...

>> I thought a Taylor series is just a way of constructing a polynomial 
>> approximation to a function that you don't have any better way to 
>> compute.
> 
> Indeed, so if we can estimate the derivatives by some numerical method, 
> we should be able to estimate how the actual function goes forwards, at 
> least for a little while.

So... well, we don't need to "estimate" the acceleration at all. We can 
compute it directly. (Assuming we have an exact position...) But you're 
saying you compute the acceleration several different times in order to 
estimate its integral or something?

> Another way to look at it I guess is that RK4 is effectively estimating 
> "deeper" derivatives, like x'' and x''' to better estimate how the 
> function goes.

...so you compute acceleration several times to try to estimate the 
derivative of acceleration? (I think the term is "jerk".) That makes 
slightly more sense.

> It's also crucial when you come do doing rotations as well as linear 
> movements.  For linear movements you can simply add on the accerlation 
> times dt to the velocity, then the same for position.  But you cannot do 
> this for angular movements, you need to add on the torque to angluar 
> momentum, use that to calculate a thing called spin, then add that onto 
> the angular orientation.

o_O

Let us pray I never need to handle anything other than point masses...

>> I don't follow. (I.e., I don't see how the final formula is remotely 
>> related to RK4.)
> 
> Try writing a function to estimate x' x'' and x''' of a function at a 
> certain time and position.

Well, if you have a way to compute f(x), you could try using

   f'(x) ~= f(x + dx) - f(x)

By analogy you have

   f''(x) ~= f'(x + dx) - f'(x)

and substituting the previous you eventually arrive at

   f''(x) ~= f(x + 2 dx) - 2 f(x + dx) + f(x)

By a similar process you have

   f'''(x) ~= f(x + 3 dx) - 3 f(x + 2 dx) + 3 f(x + dx) - f(x)

Of course, none of this does you any good if you can't compute f in the 
first place.

> Then use it to predict what the value of x 
> will be at the next time step based on the Taylor Series expansion.

Ouch. That sounds like fun...

> Then, assuming you are estimating the derivatives in the "correct" way, 
> you can simplify your solution and you'll end up with the RK4 algorithm 
> :-)  I have no idea what mathematical jiggery pokery you'll need to do 
> that, but that is essentially what RK4 is doing.

Mmm, right.

Of course, now I'm trying to comprehend how this *explicit* method 
differs from the more accurate *implicit* method I keep hearing about...


Post a reply to this message

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