[ODE] Running ODE backwards in time?
Alen Ladavac
alenl-ml at croteam.com
Mon Nov 15 12:15:07 MST 2004
I'd say that this is insolvable for general case with dynamic friction. If a
box slides on a horizontal plane and comes to rest, how do you calculate
where it was supposed to come from, from its position only? ;)
----- Original Message -----
From: "Adam Moravanszky" <adam.moravanszky at novodex.com>
To: <mtoussai at inf.ed.ac.uk>
Cc: <ode at q12.org>
Sent: Monday, November 15, 2004 10:36
Subject: Re: [ODE] Running ODE backwards in time?
> mtoussai at inf.ed.ac.uk wrote:
>
> Hi there!
>
> I need to run some simulations backwards in time (for some planning
> algorithms..). I know I could do this by inverting all dynamic properties
> ((angular) velocities, accelerations, etc.) of the system and running ODE
> forwards. But is there a simpler way? Just setting a negative time
interval in
> a step function doesn't work.
>
> Thanks!
> Marc.
> _____________________
>
>
>
> :-) It is not that easy. You would have to rewrite the physics engine,
> reversing all of the operations, including their order. For example,
> imagine the super simple hypothetical physics engine for simulating a
> point mass falling due to gravity:
>
> >> a = 10;
> >> v = 0;
> >> p = 0; //acceleration, velocity, and position
> >> v = v + a; p = p + v; [p v] //matlab code
> ans =
>
> 10 10
>
> >> v = v + a; p = p + v; [p v]
> ans =
>
> 30 20
>
> >> v = v + a; p = p + v; [p v]
> ans =
>
> 60 30
>
>
> You can now make the particle go backwards in time if you reverse the
> whole process, but note how the code changes:
>
> >> p = p - v; v = v - a; [p v]
> ans =
>
> 30 20
>
> >> p = p - v; v = v - a; [p v]
> ans =
>
> 10 10
>
> >> p = p - v; v = v - a; [p v]
> ans =
>
> 0 0
>
>
> --Adam
>
>
>
> _______________________________________________
> ODE mailing list
> ODE at q12.org
> http://q12.org/mailman/listinfo/ode
>
More information about the ODE
mailing list