Difference between varying a matrix or a variable over time

61 Views Asked by At

My question is: I have a Rotation_Matrix and I want to interpolate the rotations over time (from instant 0.0 to instant 1.0). I've done it with two approaches:

  • For the first case, I extracted the angle from the rotation matrix and then interpolated the value: $\text{angle}(t) = \text{angle}*t$. And it works normally.

  • For the second case, i vary the Rotation Matrix directly over time and then extracted the resulting angle. The way $i$ vary the matrix was: $\text{rotation_Matrix}(t)= (1-t)*Identity + t*\text{rotation_Matrix}$.

And it works too, but like it's shown in the above image, the interpolation values are completely different.

Wasn't it suppose that both approaches give same results?
How can I formulate Case 1 to give me the same results of Case 2?

Thanks :)

Differences between approaches

1

There are 1 best solutions below

2
On

Your first approach will give a rotation matrix at time t as

$\begin{bmatrix}cos(A*t)&-sin(A*t)\\sin(A*t)&cos(A*t)\end{bmatrix}$

and the second approach will give

$\begin{bmatrix}(1-t)+tcos(A)&-tsin(A)\\tsin(A)&(1-t)+tcos(A)\end{bmatrix}$

So, of course, they give different results.

Please note that the "rotation matrix" obtained from 2nd approach is in fact not a pure rotation matrix.