I have vectors E1 = {22.607, 3.495, -30.795};
and R1 = { 4.74061, 21.7549, 30.6501};
. This vectors are conneted by a 3D rotation such that R1 = Rot. E1
Rot
is the roation matrix (there can be some error due to measurment).
How to find the optimal rotation matrix so that it can be applied to another set of vectors which goes through same transformation.
PS. the other set is let's say E2 = {-13.236, 25.903, 13.937};
and R2 = {-17.5342, -26.6773, -0.10567};
. Now we know only R2
$\begingroup$
$\endgroup$
7
$\begingroup$
$\endgroup$
RotationMatrix
rotm = With[
{
e1 = {22.607, 3.495, -30.795},
r1 = {4.74061, 21.7549, 30.6501}
}
, (Norm[r1]/Norm[e1]) RotationMatrix[{e1, r1}]
];
MatrixForm[rotm]
rotm.{22.607, 3.495, -30.795}
(* {4.74061, 21.7549, 30.6501} *)
TransformationFunction
transfunc = With[
{
e1 = {22.607, 3.495, -30.795},
r1 = {4.74061, 21.7549, 30.6501}
},
Last@FindGeometricTransform[{r1}, {e1}]
]
transfunc[{22.607, 3.495, -30.795}]
(* {4.74061, 21.7549, 30.6501} *)
FindGeometricTransform
. $\endgroup$ – rhermans Jun 25 '18 at 12:44