Tail of rotated vector not properly defined using Rodrigues' rotation formula

221 Views Asked by At

I programmed https://en.wikipedia.org/wiki/Rodrigues%27_rotation_formula for some graphics stuff, but encountered what seems to be a math problem with the formula, as discussed below...

The wikipedia formula itself is,
    $\vec v_{rot} = \vec v\cos\theta\ +\ (\vec k\times\vec v)\sin\theta \ + \ \vec k(\vec k\cdot\vec v)(1-\cos\theta)$
where $\vec v$ is the original vector to be rotated through an angle $\theta$ around a unit vector $\vec k$ (that passes through the origin). And, by the way, I programmed $\vec v\times\vec k$, rather than vice versa, for the "direction convention".

For my troublesome example, I had $\theta=90^o$ so the first term vanishes, and I had $\vec v\perp\vec k$ so the third term vanishes, leaving just
    $\vec v_{rot}=\vec v\times\vec k$.

In particular, picture usual axes $y$ to your right, $z$ up, and $x$ out-of-the-screen.
Rotation axis $\vec k$'s a unit from the origin $(x,y,z)=(0,0,0)$ along the $y$-axis to point $(0,1,0)$. And the vector $\vec v$ to be rotated starts in the $yz$-plane at point $(0,1,1)$ and goes parallel to the $x$-axis, ending at point $(1,1,1)$.

So the expected result would rotate $\vec v$ by $90^o$ around the $y$-axis (clockwise looking from the origin along $y$), giving $\vec v_{rot}$ starting in the $xy$-plane at point $(1,1,0)$ and heading down to $(1,1,-1)$. But the cross-product loses that $(1,1,-)$, and goes from $(0,0,0)$ to $(0,0,-1)$ instead.

The numerical problem is that the tail of $\vec k$ and the tail of $\vec v$ don't coincide. I could do any kind of translations back-and-forth, before and after the rotation. But I'm not seeing any translation that takes the original tail of $\vec v$ at $(0,1,1)$ and ultimately translates back to $\vec v_{rot}$'s tail at $(1,1,0)$. The cross-product seems to irretrievably lose that information in this kind of situation (where $\vec v$ and $\vec k$'s tails don't coincide).

So is there any way to get that expected result above, in the example case and, of course, in the general case? Or am I just making some blunder, since I'm not googling any other discussion of this problem, which I imagine would be pretty common?

    E d i t
--------------
Let me try to clarify/simplify the question in response to @LordSharktheUnknown's comments below.

Firstly, in the case where $\theta=90^o$ and $\vec v\perp\vec k$, Rodrigues' formula simplifies to $\vec v_{rot}=\vec v\times\vec k$. Is that right?

If so, then the usual definition of cross-product, e.g., http://tutorial.math.lamar.edu/Classes/CalcII/CrossProduct.aspx defines only the vector's head, always leaving its tail implicitly at the origin.

Therefore, the tail of every $\vec v_{rot}=\vec v\times\vec k$ is necessarily at the origin. But that's typically not going to be the expected result of rotating a vector whose tail doesn't start at the origin, as illustrated by my example. So how do you use Rodrigues' formula in such cases (and what's the "fix" for the general case)?

1

There are 1 best solutions below

1
On BEST ANSWER

The vector being rotated in the Wikipedia article that you reference is the position vector of a point—its “tail” is at the origin and remains fixed. Described in those terms, what you’re trying to do is rotate a directed line segment about its initial point, which isn’t necessarily at the origin. To perform this transformation, translate the origin to the initial point (tail), apply Rodrigues’ formula to the translated end point (head), then translate back.