Rotate vector by a given angle in given direction on a sphere.

854 Views Asked by At

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.