1

$1.$Find the axis and rotation angle of $T$ such that $T(v)=w$, for $v=(2,0,2)$ and $w=(0,2,-2)$. In case there is not such rotation, explain why.

$2.$ Say if it is possible to define a rotation $A$ about some axis passing through the origin such that $A(1,1,1)=(0,\sqrt 2,1)$.

I took the rotation about the $X,Y$ and $Z$ axes but it did not work. There is a general formula, I would like to know if there is another way to solve that kind of exercise

Knowing how to do this exercise I can try this other one.

Thank you!

John
  • 206

2 Answers2

0

For (1), since both the vectors have the same magnitude, such a rotation is possible. To get the axis about which to rotate, one possibility is on that is perpendicular to both vectors. This is because in moving from one vector to the other, we stay in the plane defined by them. So, the axis is just the cross product of $v$ and $w$.

Now for the angle, it is easy to find the angle between two vectors. This is given by:

$$\cos(\theta) = \frac{v.w}{||v|| ||w||}$$

For an implementation in python, check out this library (rotate_vec2vec method): https://github.com/ryu577/pyray/blob/master/pyray/rotation.py

Rohit Pandey
  • 7,547
  • 1
    “... observe that it must be perpendicular to both vectors.” This is false. For example, one could take the angle bisector of $v$ and $w$ as the axis and rotate through an angle of $\pi$. In fact, there is an infinite number of rotations that will take $v$ to $w$. – amd Mar 16 '19 at 21:28
  • Sure, I'll edit (hadn't thought of that). But this one does provide one way to do it which is what the exercise asked. – Rohit Pandey Mar 16 '19 at 21:39
  • Unfortunately, the question asks for “the” rotation, which is not well-defined. – amd Mar 16 '19 at 21:43
  • 2
    My example rotation is even easier to compute: the angle is always $\pi$ and the axis is $v+w$ :) – amd Mar 16 '19 at 21:43
  • Agree. The axis has to lie in a plane perpendicular to the two vectors and passing through the angle bisector of the two. – Rohit Pandey Mar 16 '19 at 22:24
  • Umm... not quite. The axis has to lie on the plane that’s perpendicular to $v-w$, i.e., is perpendicular to the plane that they span. There is no plane that’s perpendicular to both vectors unless they’re colinear. – amd Mar 16 '19 at 22:28
  • Sorry, yes.. no plane perpendicular to both. But there are infinite planes perpendicular to the plane that they span. We want the one that completely contains $v+w$. The angle bisector of $v$ and $w$ happens to be $v+w$ since they are equal in magnitude. – Rohit Pandey Mar 16 '19 at 22:40
  • 1
    That part of your previous comment was correct, so I didn’t bother saying anything about it. – amd Mar 16 '19 at 22:56
0

Problem 2:

$$A (1,1,1) = (0, \sqrt 2, 1)$$

Lets define a rotation axis $N = (1,1,1) \times (0, \sqrt 2, 1)$

We should also define two orthogonal vectors $U$ and $V$ in the rotation plane with normal $N$.

We can find $U$ by projecting $(1,1,1)$ into the plane with normal $N$.

$$U = (1,1,1) - \frac{N \cdot (1,1,1)}{N \cdot N} N$$

Since $N \cdot (1,1,1) = 0$ then:

$$U = (1,1,1)$$

And $V$ can be found as the cross product:

$$V = N \times U$$

For the sake of simplicity on the formulations we assume that $U$, $V$ and $N$ are normalized vectors from now on.

We define the matrix $M = [U V N]$, having the the vectors $U$, $V$ and $N$ as columns.

Let also define the coordinate vectors $E_1 = (1,0,0)$, $E_2 = (0,1,0)$ and $E_3 = (0,0,1)$. The matrix $M$ map the coordinate vectors with vectors $U$, $V$ and $N$.

$$M E_1 = U$$ $$M E_2 = V$$ $$M E_3 = N$$

Conversely $M^T$ map the vectors $U$, $V$ and $N$ to the coordinate vectors $E_1$, $E_2$ and $E_3$.

Now, we define the rotation matrix $R$ that rotates an angle $\theta$ around the $E_3$ axis. Where $\theta$ is:

$$\theta = \cos^{-1} (\frac{(1,1,1) \cdot (0, \sqrt 2, 1)}{\|(1,1,1)\| \|(0, \sqrt 2, 1)\|} )$$

Finally the matrix $A$ would be:

$$A = M R M^T$$

To show that the matrix $A$ is doing a rotation in the $U V$ plane around the nornal $N$ we can derive the formula:

$$A (1,1,1) = M R M^T (1,1,1)$$

Since $(1,1,1) = U$:

$$A (1,1,1) = M R M^T U$$

Since $M^T U = E_1$:

$$A (1,1,1) = M R E_1$$

Since $R E_1 = \cos(\theta) E_1 + \sin(\theta) E_2$:

$$A (1,1,1) = \cos(\theta) M E_1 + \sin(\theta) M E_2$$

Recalling that $M E_1 = U$ and $M E_2 = V$:

$$A (1,1,1) = \cos(\theta) U + \sin(\theta) V$$

Which is a meaningful result to keep in mind.

  • Very nice, but perhaps more work than necessary. A rotation through an angle of $\pi$ about the axis $v+w$ works, too. – amd Mar 17 '19 at 00:04
  • 1
    In fact we need only know that a necessary and sufficient condition is that the two vectors have equal magnitude. We confirm that the magnitude is $\sqrt3$ in both cases, and we’re done. – David K Mar 17 '19 at 13:05
  • @amd you are right. A very compact expression for the rotation matrix rotating from $v$ to $w$ around the axis $v + w$, being $v$ and $w$ unit vectors can be found here: https://math.stackexchange.com/a/2672702/485657 – Mauricio Cele Lopez Belon Mar 17 '19 at 14:42
  • @DavidK I agree with you. – Mauricio Cele Lopez Belon Mar 17 '19 at 14:45