(EDIT: I also welcome a solution to the special case where d, e, f are coplanar)
I think this problem can be solved iteratively, but I was wondering if there could be a closed-form solution...
Anyone with an idea for a closed-form method?
(EDIT: I also welcome a solution to the special case where d, e, f are coplanar)
I think this problem can be solved iteratively, but I was wondering if there could be a closed-form solution...
Anyone with an idea for a closed-form method?
Copyright © 2021 JogjaFile Inc.
Different idea. For any linearly independent $a$ and $d$, by Gram-Schmidt orthogonalization the vector $a'$ is orthogonal to $d$:
$$a' = a - \frac{(d \cdot a)}{(d \cdot d)} d$$
So now we are looking for $R$ such that:
$$\min_R \sum_i {\|R a_i - a'_i\|^2}$$ $$s.t. \ \ \ R^T R = I$$
Which is an instance of the Wahba's Problem:
https://en.m.wikipedia.org/wiki/Wahba%27s_problem
which solution would be straightforward to compute using SVD. Of course the Gram-Schmidt introduces a change in the scale of vectors, that could be compensated by normalization. Also, Wahba's problem admit weights $w_i$ in order to give more importance to some pair or vectors than others, if needed.