Results 1 to 4 of 4

Math Help - How to determine rotation and translation between v1 and v2

  1. #1
    Newbie
    Joined
    Jan 2009
    Posts
    3

    How to determine rotation and translation between v1 and v2

    Hi all,

    Say I have two 3D vectors, v1 and v2.
    How do I determine the rotation and translation that is needed to go from v1 to v2?
    I know the 4D rotation/translation matrix. But I see no way to solve these equations with just the v1 and v2 as known.

    I actually have 2 points that move in 3D space. The two points that define the vectors are linked together in that they always are at the same distance from each other. So it's like a stick in 3D space and I would like to follow the two end points in terms of (x,y,z) translation and yaw, pitch, and roll, but I only know that starting vectors (at t=0) and the end vectors (at t=1).

    Thanks all,

    Marco
    Follow Math Help Forum on Facebook and Google+

  2. #2
    Member alunw's Avatar
    Joined
    May 2009
    Posts
    188
    Does your 4D matrix have bottom row (0,0,0,1). (It probably should do). If so I'd suggest that the upper left 3*3 minor is the rotation matrix and the (1*3) column vector to the right is the translation.
    At any rate, applying that matrix as a linear transformation and then translating by that amount would be equilvalent to your 4D transformation.

    You might want the rotation about the centre of the stick. In that case conjugate your matrix by the translation that sends the centre of the stick to the origin.

    Apologies if I've totally misunderstood your question.
    Follow Math Help Forum on Facebook and Google+

  3. #3
    Newbie
    Joined
    Jan 2009
    Posts
    3
    Hi,
    Thanks for your quick reply.
    Yes the basic matrix is in order (I hope :-).
    And I think I understand how it works. The problem is that I do not know the rotation or the translation. That is what I would like to find out having only the two vectors to P1 and P2 before and after the rot/trans.

    Can you please explain a bit more about conjugating the matrix?

    Thanks!!!

    Marco
    Follow Math Help Forum on Facebook and Google+

  4. #4
    Member alunw's Avatar
    Joined
    May 2009
    Posts
    188
    Suppose you wanted to tell someone how to move the stick so that its endpoints moved from (p0,q0) to (p1,q1). You would probably want to tell them to rotate the stick through some angle about some axis through its centre and then translate it afterwards. All that information in the 4*4 matrix, except that the rotation is about the origin of the coordinate system, instead of about the centre of the stick. So to fix this you need to conjugate the matrix to change the coordinate system to move the origin to the centre of the stick i.e. (p0+q0)*0.5. That's very easy. Form the matrix which has ones along the main diagonal and zeros everywhere else, except for the first three rows in the last column, which should be the coordinates of the point (p0+q0)*0.5. If your original matrix was M and this matrix is T then the matrix relative to the coordinate system with the origin at the original centre of the stick is T^-1*M*T (because T converts from your desired coordinate system to the actual system, M is the matrix you say you know and T^-1 changes the coordinates back to the ones you want). Obviously you also need to apply T^-1 to the coordinates of the stick (since these are initially relative to some standard origin).
    You should find that this conjugation does not change the 3*3 matrix at the top left, but only the "translation" part of the matrix to the right.
    You should be able to verify that the top left 3*3 matrix is a rotation matrix, by checking it has determinant 1 and that it is orthogonal i.e. its inverse is its transpose.
    If you want to find out things like the axis and amount of rotation then you need to calculate the eigenvector for the eigenvalue 1 (1 is surely an eigenvalue of a 3D rotation matrix). I'm not quite sure about "yaw, pitch and roll" as I've never used them myself, but there are bound to be formulas for calculating them from a 3D rotation matrix.

    Since a stick is essentially 1 dimensional you could never hope to find a unique answer for the rotation given only starting and end points for the two ends. Clearly you could compose the motion with an arbitrary rotation about the axis of the initial or final position of the stick. But since you have a matrix which is supposed to be a rigid motion, you can find out what rotation this corresponds to.
    Follow Math Help Forum on Facebook and Google+

Similar Math Help Forum Discussions

  1. Replies: 0
    Last Post: January 14th 2012, 09:02 PM
  2. Translation/Rotation help =(
    Posted in the Pre-Calculus Forum
    Replies: 1
    Last Post: April 22nd 2010, 04:02 AM
  3. Translation and then a rotation of a triangle
    Posted in the Trigonometry Forum
    Replies: 4
    Last Post: April 14th 2010, 07:29 AM
  4. Complex function : composition of a translation, rotation, etc
    Posted in the Differential Geometry Forum
    Replies: 6
    Last Post: September 12th 2009, 07:46 PM
  5. Vector Rotation 3D - determine correct angle
    Posted in the Calculus Forum
    Replies: 1
    Last Post: January 18th 2008, 07:32 AM

Search Tags


/mathhelpforum @mathhelpforum