Suppose you have the (known) 3x3 matrices A, B, C, and D and you also have the (known) 3D vectors a, b, c, and d. How would you go about finding the (unknown) matrix Q for which AQa = BQb = CQc = DQd?
I feel like there should be some elegant linear-algebra way of solving this but I haven't been able to come up with anything (except a possible, if ugly, numerical method). If it helps, you may assume that A, B, C, and D are rotation matrices.