0
$\begingroup$

I'd like to find matrix that allow me to rotate any vector by a $\theta$ angle in direction given by $\phi$ angle. E.g.

  1. when I rotate any vector by a $\theta = \pi / 2$ and constant $\phi$ four times I'll be in the same position.
  2. When I rotate any vector by a $\theta= \pi/2$ and $\phi = 0$ and then by a $\theta = \pi / 2$ but $\phi = \pi$ I'll back to the first position.

I know how rotation around any axis looks like but I need to rotate vector around any chosen axis.

  • 0
    https://en.wikipedia.org/wiki/Rotation_matrix#Rotation_matrix_from_axis_and_angle2017-01-16
  • 0
    @Winther I saw it but I no have idea how to use it.2017-01-16
  • 0
    To specify a general rotation you need an axis and the amount of rotation (usually an angle) around the axis. In order to specify an axis in spherical coordinates, you need two angles (except in the two cases you used in your example 2., where $\phi=0$ or $\phi=\pi$). That's three angles altogether to specify the rotation. You have named only two angles, so how is the rotation specified?2017-01-16
  • 0
    @DavidK so is it: $R_z(\phi) Ry(\theta) Rz(\alpha) Ry(-\theta) Rz(-\phi)$?2017-01-16
  • 0
    That _might_ be the rotation matrix if you want the axis of rotation to pass through spherical coordinates with polar angle $\theta$ and azimuthal angle $\phi$ (the "physics" convention for spherical coordinates), rotating by angle $\alpha$ around that axis (_not_ by angle $\theta$ as stated in the question), provided you choose the appropriate direction of rotation for positive angles in $R_y$ and $R_z$. If everything was defined by right-hand rules I think it works.2017-01-16
  • 2
    You wrote, "I need to rotate vector around himself." There is a notion of performing a rotation around a vector, meaning the vector gives the direction of the axis of rotation. When you do this, the rotation _does not effect_ the vector chosen for the axis, nor any vector in the same direction or opposite direction. So to rotate a vector around itself is to do nothing to the vector. Rotation changes a vector only when we rotate around some _other_ vector (which could be one of the basis vectors that define the axes).2017-01-16
  • 0
    By the way, you could just try your suggested matrix and see if it works. With $\phi=0$, $\theta=\pi/4$, $\alpha=\pi/2$, see if the vector with polar coordinates $(\theta,\phi,1)$ is moved; if it is, you probably have either the wrong direction for $R_y$ or you have chosen a convention for which angle is $\theta$ and which is $\phi$ that doesn't match that matrix. If you have software to do the matrix computations for you, trial and error is a reasonable way to figure out how to build the rotation matrix you want.2017-01-16
  • 0
    By this 'rotation around himself' I mean rather around any axis, my bad. I tried this and it looks quite well so I think it's correct. Thanks a lot!2017-01-16

0 Answers 0