Closed zhy91 closed 2 years ago
Sorry for my stupid issue. :<
I soon realize that u
and c
in the above example are actually the axis and angle in the way "Rotating around an axis".
Therefore, the new way is not necessary.
Sorry for digging this out but I just wanted to create a similar issue and now scratching my head how you solved it.
I guess that we can use RotationVecGenerator
with f × t
as an axis, something like: R = RotationVecGenerator((a × b)...)
but how do we pass the angle?
If you need to create a rotation from an angle a
and its axis [v1, v2, v3]
, you can use AngleAxis(a, v1, v2, v3)
.
If you need to create a rotation that rotates a vector u
to a vector v
, you can use rotation_between(u,v)
.
Ah yes, makes sense, thanks!
Introduction
Now,
Rotations.jl
contains two ways to represent rotation matrices: Euler Angles and Rotating around an axis.However, vector rotation, i.e., rotating from one vector to another, is sometimes needed. Is it possible to add this way?
Mathematical method
References:
By the way, such rotation has infinite solutions. The above method gives only one of them.
Simple example
This is a simple example written by myself:
Thank you all!