I need to rotate a (unit) vector a at a known angle γ relative to a rotation axis in 3d space. Vector a points from the origin to a point that is located on a unit circle where its origin is the same as the world space and it "sits" in the xy plane of the coordinate space, as illustrated bellow:
My knowledge on mathematics is super limited but it's not hard to visualize the fact that I could rotate the vector a at a known angle around the rotation axis (drawn in blue) which looks like the tangent of the circle where vector a points.
- How do I find the rotation axis?
- How do I make the rotation?
An example demonstrating that process would be quite helpful!
Best Answer
The axis of rotation is $\mathbf{a}$ rotated by 90 degrees about the z axis. This is $(-a_y, a_x, 0)$. To rotate $\mathbf{a}$ about the axis of rotation, use Rodrigues' rotation formula.