[ODE] RE: velocity constraints vs. acceleration constraints

Erin Catto erincatto at sbcglobal.net
Tue Jan 11 23:05:46 MST 2005

```In the acceleration formulation, accelerations (and Lagrange multipliers)
are computed from the equations of motion and the acceleration constraints.

M*A = J'*lambda + F
J*A = c

Solve for A and eliminate A from the acceleration constraint.

A = inv(M)*J'*lambda + inv(M)*F
J*inv(M)*J'*lambda + J*inv(M)*F = c

Let W = J*inv(M)*J'

Solve for lambda and use it to compute A.

lambda = inv(W)*(c - J*inv(M)*F)
A = inv(M)*J'*lambda + inv(M)*F

Now you can integrate the accelerations and old velocities with any
integrator and find the new velocities and positions. Then you adjust the
velocities and positions to satisfy the constraints.

Another approach is to use Baumgarte stabilization of constraints. This
adjusts the accelerations constraints by feeding back the velocity and
position constraint errors. This is faster, but not as stable.

Erin

-----Original Message-----
From: ode-bounces at q12.org [mailto:ode-bounces at q12.org] On Behalf Of Gary R.
Van Sickle
Sent: Tuesday, January 11, 2005 6:23 PM
To: ode at q12.org
Subject: RE: [ODE] RE: velocity constraints vs. acceleration constraints

>    One place where I've seen something that works only on
> position constraints is in this Gamasutra "Advanced Character
> Physics" article
> (http://www.gamasutra.com/resource_guide/20030121/jacobson_04.shtml),
> where the author just uses an iterative "relaxing"
> algorithm to reposition particles after doing a
> non-constrained forward integration step.  I'm not sure how
> physically realistic this is or how well it extends to rigid
> bodies (they just use it for particle
> systems in the article, I believe).   But the
> advantage there is that you are always guaranteed to end up
> in a configuration where all of the position constraints are
> satisfied.
>

Isn't there some way to combine accelleration, velocity, and position
constraints into a single "Grand Unified Constraint Theory"?  Would it make
any sense to do something like this

While(constraints are being violated)
{
Solve for positional constraints;  // This eliminates things like
interpenetration causing huge restoration forces
Solve for velocity constraints;
Solve for acceleration constraints;
}

?

I apologize if this is wildy dumb; I'm tired, and the mathematic/algorithmic
part of my brain refuses to get involved in any of this.

--
Gary R. Van Sickle

_______________________________________________
ODE mailing list
ODE at q12.org
http://q12.org/mailman/listinfo/ode

```