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 M =
(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( \frac{0.938}{0.342} ) to get [-0.3425 -0.9395 0]. Apply the same rotation to M.
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 \hat{r}.
3. The new angle of rotation should be \hat{\theta} = arctan(\frac{0.0566}{\sqrt{0.3425^{2} + 0.9395^{2}}}).
4. Apply Rodriguez's rotation formula by \hat{\theta} about \hat{r} to M
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 M =
(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( \frac{0.938}{0.342} ) to get [-0.3425 -0.9395 0]. Apply the same rotation to M.
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 \hat{r}.
3. The new angle of rotation should be \hat{\theta} = arctan(\frac{0.0566}{\sqrt{0.3425^{2} + 0.9395^{2}}}).
4. Apply Rodriguez's rotation formula by \hat{\theta} about \hat{r} to M
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!