Constraint resolution (debutant)

Please don't post Bullet support questions here, use the above forums instead.
neodelphi
Posts: 8
Joined: Sun Aug 05, 2007 6:20 pm

Constraint resolution (debutant)

Post by neodelphi »

Hello,

I'm learning how to make a small physic engine. I read some different articles dealing with rigid body dynamics and simulation, and I recently found Erin Catto's document titled "Iterative Dynamics with Temporal Coherence". I have already done a little physic engine mainly based on a document from David Baraff : it uses timeswap technique to prevent from interpenetration and it builds a linear system to constraint relative velocities between bodies. Although this is in theory correct, it is hard to implement and I have a lot of problems (with bouncing and also timeswap: sometimes I have infinite responses because the step found was 0 seconds !). So I decided to rewrote a big part of the engine since I prefer Erin Catto's approach.

I understood the equations established in his document. However, I'm stuck at page 14, where the final equation is written:

J * B * lambda = µ

where J is the Jacobian for the contacts, lamba the vector of forces magnitudes, µ a big term (including InvMass, Bias, initial Velocity) and B = inv(M) * J^T

J^T is the orthogonal matrix of J.

I understood that I must solve J B lambda = µ and find the vector lambda, but I don't have the J^T matrix ? Is there anyway to compute this matrix from J ? Maybe there is something I didn't understand correctly.

Thank you in advance for all your responses !
(sorry for my English, I'm french ) :lol:
Erin Catto
Posts: 316
Joined: Fri Jul 01, 2005 5:29 am
Location: Irvine

Post by Erin Catto »

The matrix J^T is just the transpose of J.

http://en.wikipedia.org/wiki/Transpose
neodelphi
Posts: 8
Joined: Sun Aug 05, 2007 6:20 pm

Ok

Post by neodelphi »

Ok !

So it is not very difficult to compute ! I'm feeling a little bit stupid :oops: - this is simple. I did some confusion but now I understand (I hope !). Thanks a lot for your help (and also your really helpfull document).

Thx :P
neodelphi
Posts: 8
Joined: Sun Aug 05, 2007 6:20 pm

Some news

Post by neodelphi »

I've just implemented the equations to solve the constraints, and it works perfectly. For the moment I only have a cube fixed on the background at a point (1 constraint): it is a simple pendulum. The Bias also works (no suprise) to correct the errors.

Have a nice day.