0
votes

I have a two 3D vectors A, B and the angle alpha between these two vectors. I would like to change this angle and rotate vector B by 3/7 of angle alpha towards vector A.

How can I do this in the simplest way?

My current approach is to create a matrix describing a plane based on on both vectors, then multiplying rotation matrix with angle 3/7 of alpha, where alpha is determined from cross product of A and B.

Well, it works, but I think it is an overkill and could be simplified. Any ideas?

1
Google SLERP.meowgoesthedog

1 Answers

2
votes

You could create the cross-product. This vector then is the basis for a quaternion rotation that goes 3/7alpha.

Under the hood though all of this will always boil down to the same maths. So if your solution works, encapsulate it into a function & be happy. And the matrix is advantageous (regardless of where you got it from, quaternion or by your means) because it can be composed with others, e.g. local to world coordinates.