Yes, I 've figured that Heun's method was better that RK for this type of code but I wanted to use the more precise and exact method there is, so I thoug as RK was a forth order, that I would be better than Suvat, Heun or verlet
Thanks. My problem was to find a method that uses the system of 3 vars, and that doesn't need to have a function to get the acceleration, I needed to give the aceleration instead and it will calculate those 3 vars only by having the force as a given constant, not a function.
but it seems to...
I think I'm trying to do something impossible here, or I might be cursed with this code, because everything I try to change it always gives me bad results or impossible solving systems.
I've changes the NewDerivative to the starting values but it is still giving me wrong values...
Yes, I've seen that, but this is an adaptation from another code I had here, is that the only problem? if so, what should I use insted? A 0 Value Derivative?
I've tried to use this:
NewDerivative.DPos := Vector(0, 0);
NewDerivative.DVel := Vector(0, 0);
NewDerivative.DAcc :=...
Thats my problem, I don't know much about 4 order derivative expressions, and I think I'm close but somehow or a numeric error appears or the results get wrong like geting very large numbers or oscilating from positive to negative very quickly, so if I need to have a falling body to get more and...
When I run a simulation on a simple particle falling at V0 = 0, I use this conditions:
Particle = record
P: TVect2;
V: TVect2;
A: TVect2;
F: TVect2;
end;
procedure SimStart;
begin
Particle.P := Vector(0, 0); <- Start its Position
Particle.A := Vector(0, -9.8); <-...
Thanks for all the exaplanations but as you said to use:
I've already done that but for some reasson it still doesn't work correctly:
P = pos vector
V = vel Vector
A = Acc vector
F = force Vector
procedure RK4Integrate(var P, V, A, F: TVect2; DT: Single);
type
State = record...
Hi, I'm trying to calculate a postion and velocity of a body over time using an integrator at each time step, I've only used simple integrators so far but I wanted to a better one that I've seen, RK4 - Runge–Kutta method, to calculate new values of position equation.
I've been using the...