How do you find 3 angles of eulers between two 3D vectors? When I have one vector, and I want to get its rotation, this link can usually be used: Calculate rotations to look at a 3D point?But how do I do this when calculating them relative to each other?
As others have already pointed out, your question should be reviewed. Let me call your vectors aand b. I assume that length(a)==length(b) > 0otherwise I cannot answer the question.
a
b
length(a)==length(b) > 0
cross product v = a x b; v . dot product, , cos(angle)=dot(a,b)/(length(a)length(b)), acos (@Archie ). .
v = a x b
v
cos(angle)=dot(a,b)/(length(a)length(b))
acos
- , : . Axis-Angle Euler - , . , v = [ 0, 0, 0], 0 180 .
v = [ 0, 0, 0]
, , , .
android
, . .
, 1 . . 2D-: , .
, "roll < - pitch < - yaw" :
(x z) .
yaw = atan2(x, z) *180.0/PI;
, , "" . , .
float padj = sqrt(pow(x, 2) + pow(z, 2)); pitch = atan2(padj, y) *180.0/PI;
:
MATLAB .
A = [1.353553385, 0.200000003, 0.35] B = [1 2 3] [q] = vrrotvec(A,B) Rot_mat = vrrotvec2mat(q)