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?
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.