[ODE] Constraint equations and the famous J matrix
Joakim Eriksson
jme at snowcode.com
Mon Jun 30 04:44:01 2003
I have been trying to figure out how exactly a constraint system
works for a while and I just wanted to run this buy you guys.
Someone here should be able to tell me if I'm on the right track
and if not what I have missed.
If nothing else this might help others in my situation because
I have never seen all this information collected in one place.
So lets start with the equations:
A*lambda=b
-1 T
A = JM J
-1
b =-(JM F+c)
So in the abover equations we have:
lambda = The unknowns we want to find
J = The jacobian constraint matrix
M = The mass matrix
F = External forces that exists in the system
Now for a small example. Say I want to constrain a body
to a world position. What would I have to do to get that to work?
-1
First we need to fill in M so it should look something like:
A-----
-B----
--C---
---DEF
---GHI
---JKL
In the abover ascii drawing A-C is linear inverse mass and D-L is
rotational inverse mass.
If we ignore joint positional (error) fixing c is 0
But in this abover case what does the J matrix look like?
>From joint.pdf (Good doc BTW) I guess that the J matrix would look
like this
1-----
-1----
--1---
----QN
---O-P
---QM-
Where M-O is the positive (x,y,z) anchor point and P-R is the anchor
point neged. In otherwords the lower left is a matrix representation
of a vector cross product with the anchor point.
Is this a correct J matrix for this example or am I way off here?
Cheers
Joakim E.