Calculating rotation matrix of coordinate system from 2 known axis

1.6k Views Asked by At

(https://i.stack.imgur.com/aG0QB.png)

In the image my main coordinate system is in the upper right corner. I measured $3$ points on a board and created a help coordinate system. V1 points directly to the origin of the help coordinate system. V2 and V3 lie on different axis of the help coordinate system.

I want to find the transformation matrix. So V1 is my translation, right? Subtracting V1 from V2 and V3 I can move the origin of the help coordinate system to the origin of the main coordinate system, right?

But how do I calculate the rotation?

1

There are 1 best solutions below

4
On BEST ANSWER

You can construct a set of three orthogonal vectors from the following:

$$u_1 = v_2 - v_1$$ $$u_3 = u_1 \times (v_3 - v_1)$$ $$u_2 = u_3 \times u_1$$

Once you normalize all three of these vectors you can construct the rotation matrix as follows:

$$\mathbf R = [u_1\ u_2 \ u_3]$$

This is what I have referred to as a triad, although I am not sure how common that terminology is.