- #1
Val di Vera
- 1
- 0
I want to find the rotations needed to rotate one unit vector into another unit vector and then use these rotations to rotate a 3x3 matrix.
For example: I want to determine the rotations needed to rotate [1 0 0] into [-0.342, -0.938, 0.0566] and apply the same rotation to the matrix [tex]M[/tex] =
(1 0 0)
(0 2 0)
(0 0 3)
The way I've thought of doing this is to:
1. Rotate [1 0 0] about the z-axis by the angle arctan( [tex]\frac{0.938}{0.342}[/tex] ) to get [-0.3425 -0.9395 0]. Apply the same rotation to [tex]M[/tex].
2. Take the cross product between [-0.3425 -0.9395 0] and [-0.342 -0.938 0.0566] to get a new axis of rotation [tex]\hat{r}[/tex].
3. The new angle of rotation should be [tex]\hat{\theta}[/tex] = arctan([tex]\frac{0.0566}{\sqrt{0.3425^{2} + 0.9395^{2}}}[/tex]).
4. Apply Rodriguez's rotation formula by [tex]\hat{\theta}[/tex] about [tex]\hat{r}[/tex] to [tex]M[/tex]
I hope it's clear what I'm trying to do. If anyone can confirm that I'm doing this correctly, or come up with a better way of doing this, I'd very much appreciate it.
Thanks!
For example: I want to determine the rotations needed to rotate [1 0 0] into [-0.342, -0.938, 0.0566] and apply the same rotation to the matrix [tex]M[/tex] =
(1 0 0)
(0 2 0)
(0 0 3)
The way I've thought of doing this is to:
1. Rotate [1 0 0] about the z-axis by the angle arctan( [tex]\frac{0.938}{0.342}[/tex] ) to get [-0.3425 -0.9395 0]. Apply the same rotation to [tex]M[/tex].
2. Take the cross product between [-0.3425 -0.9395 0] and [-0.342 -0.938 0.0566] to get a new axis of rotation [tex]\hat{r}[/tex].
3. The new angle of rotation should be [tex]\hat{\theta}[/tex] = arctan([tex]\frac{0.0566}{\sqrt{0.3425^{2} + 0.9395^{2}}}[/tex]).
4. Apply Rodriguez's rotation formula by [tex]\hat{\theta}[/tex] about [tex]\hat{r}[/tex] to [tex]M[/tex]
I hope it's clear what I'm trying to do. If anyone can confirm that I'm doing this correctly, or come up with a better way of doing this, I'd very much appreciate it.
Thanks!