4x4 matrix for translations and rotations

Danna

New member
Joined
Feb 20, 2007
Messages
4
How do you find the 4x4 matrix (translation & rotation) of two equal distance lines or vectors in space? For example, I have a fixed vector V1= (4,3,2). I have another vector V2=(-1,4,4). How would I calculate the 4x4 matrix to align V2 to V1? And how would I check to see if the 4x4 matrix is correct?

I can understand formulas and equations a lot better if there's an actual number problem. Unfortunately, there's not much information out there with number problems for me.
------------------------------------
I can find the formula for rotation about the x,y,and z axis.

1 0 0
0 cos(a) -sin(a) .......about x-axis...a=angle
0 sin(a) cos(a)

cos(a) 0 sin(a)
0 1 0 ........about y axis...a=angle
-sin(a) 0 cos(a)

cos(a) -sin(a) 0
sin(a) cos(a) 0 ......about z-axis...a=angle
0 0 1

But how do you find the angle (a)? This is how I did it, but not sure if it's right or not:

1)I calculated the length:
|v1|^2=(4,3,2)* (4,3,2) =29=v1unit
|v2|^2=(-1,4,4)* (-1,4,4)=33=v2unit
2) normalizing
(v1 * v2)/(√29√33)=0.51721
3) angle
Cos(x)=.51721  58.9 degrees
So would this 58.9 degree be used in place of all the (a) in the rotation formula?
-------------------------------

As for the translation, I'm not sure how to find it. Do I just subtract V2 by V1? Or do I subtract the unit vector of V2 and V1?
--------------------------------------

To combine both translation and rotation into 4x4 matrix, do I multiply the rotations together and just put in the subtraction result in the last column for translation?
---------------------------------------

If I’ve gotten a matrix, how would I check it to see if it’s right?
------------------------------------

I’m really confuse on this problem….please help! Thanks!
 
You write, “I’m really confuse on this problem”! Well you have also really confused me and I am supposed to understand this.
First, why a 4x4 matrix; you seem to be mapping \(\displaystyle R^3 \mapsto R^3\)?
If that is the case then a 3x3 matrix will do.
Are you simply mapping \(\displaystyle V_1\) onto \(\displaystyle V_2\)?
Or are you preserving distance but rotating through some angle?
Can you clarify the problem? As written it may mean anything.
 
yes you are right!

It is suppose to be a 3x3 matrix ..I think it could be a 4x4 matrix, but the last row would only be 0 0 0 1.

I need to map V2 into V1. In other words, I need a rotational and translational matrix that would align V2 (wherever it may be in space) so that it would be in the same position as V1.

Sorry about the confusion! And thanks for the help!
 
The linear transformation \(\displaystyle \left[ {\begin{array}{ccc}
0 & 1 & 0 \\
1 & 0 & 1 \\
2 & 0 & 1 \\
\end{array}} \right]\) will map \(\displaystyle V_2\) onto \(\displaystyle V_1\).

However, surely there must be more to your problem.
 
hmmm?? How did you get that matrix?

I need to use the rotational and translational "formulas" to get my 3x3 matrix. From that 3x3 matrix, it would move V2 to be exactly where V1 is.
 
Danna said:
How did you get that matrix?
Years of experience; I just eyeballed it.

Danna said:
I need to use the rotational and translational "formulas" to get my 3x3 matrix. From that 3x3 matrix, it would move V2 to be exactly where V1 is.
That tells me that you may not understand this problem. First of all, vectors are not in any one place! A vector is an equivalence class of triples that have the same length and direction. The vector from (1,3,0) to (2,3,-2) is the same vector from (4,-5,5) to (5,-5,3). Yet in space those points are not in the same ‘place’. Now there is a sense in which we can identify points in \(\displaystyle R^3\) with a triple and see that triple as a vector.
So I am not sure what the object of your problem actually is.
The mapping I gave you is one-to-one and onto.
 
Perhaps I've completely went the wrong way with this problem.....

My original intent is to get two sets of points to match up with another two sets of points. I've read online and that the best thing to do is connect those two points to make it into vectors, then etc. Anyways, here's the whole ordeal (pairs are next to each other horizontally, I made up the points):

*
(2,-2,0) *(3,1,3) ::set1::

*
(3,5,6) * ::set 2::
(7,8,9)


Thanks for the help...!
 
Top