• Advertisement
Sign in to follow this  

What is it trying to do?

This topic is 3189 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi Guys, With this code snippet,
jacobian[index]=axis.cross(tempvec);

// J * JT jacobian = j
const real	x=jacobian[index].x;
const real	y=jacobian[index].y;
const real	z=jacobian[index].z;
const real	xy=x*y;
const real	xz=x*z;
const real	yz=y*z;

tempmat[0][0]+=x*x;
tempmat[0][1]+=xy;
tempmat[0][2]+=xz;

tempmat[1][0]+=xy;
tempmat[1][1]+=y*y;
tempmat[1][2]+=yz;

tempmat[2][0]+=xz;
tempmat[2][1]+=yz;
tempmat[2][2]+=z*z;
I'd like to know what this code is doing? A matrix multiplied by its transpose? And why? x*x xy xz xy y*y yz xz yz z*z Thanks in advance Jack

Share this post


Link to post
Share on other sites
Advertisement
You'll do this sort of thing alot when you are calculating the inverse kinematics of a system. Check out: http://math.ucsd.edu/~sbuss/ResearchWeb/ikmethods/iksurvey.pdf

Share this post


Link to post
Share on other sites
Quote:
Original post by mmakrzem
You'll do this sort of thing alot when you are calculating the inverse kinematics of a system. Check out: http://math.ucsd.edu/~sbuss/ResearchWeb/ikmethods/iksurvey.pdf


Sorry, my english is bad, so there was a misunderstanding here.
I'd like to know if the code snippet is doing a multiplication of a matrix with its transpose..
Thanks :)
Jack

Share this post


Link to post
Share on other sites
That matrix formed by x y and z is the product of (x y z) as a column with (x y z) as a row. In that sense, it is the product of a matrix with its transpose.

Does that answer your question?

Share this post


Link to post
Share on other sites
You can see it as a tensor product( actually it is ), that is to say, the multiplication of a vector by its transpose:

A = v * transpose( v ) ( A is a 3x3 matrix and v a column vector, that is to say, a 3x1 matrix )

or

A = transpose( v ) * v ( A is a 3x3 matrix and v a row vector, that is to say, a 1x3 matrix )

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement