Page 2 of 2
Posted: Thu Mar 01, 2007 9:42 pm
by Dirk Gregorius
if x1 is the particle position then the change of the position in time is the velocity v1 = dx1/dt
(v1 - v2) is the inner derivative (I hope you call it like this in english).
Take the simple example C( x(t) ) = | x(t) |
Then dC/dt = d/dx * | x(t) | * dx(t) / dt (Chain rule)
So,
dC/dt = x(t) / |x(t)| * v
the dC/dz was a typo and I fixed it. It should read dC/dt of course
Posted: Thu Mar 01, 2007 11:29 pm
by coderchris
Ahh, I understand completely now
seems to be working out right for me now
I just have one more question regarding the paper; In equation (3) they describe how to dampen the forces. Inside the sumnation, they have
dC
--- v
dp
As I understand it, dC/dp is a vector but so is velocity (v).
Are they implying a dot product here (x1*x2 + y1*y2 + z1*z2)?
Or, do they imply a component-wise multiplication? (x1*x2, y1*y2, z1*z2)
Posted: Thu Mar 01, 2007 11:37 pm
by Dirk Gregorius
dC/dp is the Jacobi matrix and in this particlur case it is the gradient of the constraint function, so you better think of it in this case as a row vector. In our example it is.
J = ( Transpose(n) -Transpose(n) )
So in this case you have a 1 x 6 matrix.
Basically the Jacobi matrix stores all gradient vectors. by definition (there are some reasons for this) the gradients are stored in the rows. So this is always a bit confusing the 1D case where you can either interpret it as a vector (the gradient) or as matrix.
Note that this yields the same results:
a * b = Transpose( a ) * b // where a and b are vectors
Does this help?
Posted: Thu Mar 01, 2007 11:57 pm
by coderchris
Ah I see, I wasnt quite sure what exactly a Jacobi was, but I get it now
I got the damping working correctly now, thanks for the help
