Transformation matrix from three points in 3-D space

606 Views Asked by At

I have three points in $3$-D space, say ${\bf p}_i, i=1,2,3$. A new co-ordinate system, $\{2\}$, is defined such that:

  1. The origin is located at the circumcentre, ${\bf p}_0$, of the triangle given by points ${\bf p}_i$.
  2. The $x$-axis is in the same direction as the vector ${\bf p}_{10}$, i.e., (${\bf p}_1-{\bf p}_0$).
  3. The $z$-axis is normal to the plane formed by the points, ${\bf p}_i$.

I wish to find the transformation matrix (rotation matrix and translation vector) so that the initial frame is transformed to the frame $\{2\}$. Also, the circumradius, $\rho$, is required.

I have used the following method to obtain the results:

  1. ${\bf a} = {\bf p}_1 - {\bf p}_3$, ${\bf b}={\bf p}_2-{\bf p}_3$
  2. $\rho=\frac{\|{\bf a}\|\|{\bf b}\|\|\bf a-b\|}{2\|\bf a\times b\|}$
  3. ${\bf p}_0=\frac{(\|{\bf a}\|^2{\bf b}-\|{\bf b}\|^2{\bf a})\times (\bf a \times b)}{2 \|\bf a \times b\|^2}+{\bf p}_3$
  4. ${\bf \hat{x}}_2=\frac{{\bf p}_1-{\bf p}_0}{\|{\bf p}_1-{\bf p}_0\|}$
  5. ${{\bf \hat{z}}}_2=\frac{{\bf \hat{x}_2}\times ({\bf p}_2-{\bf p}_0)}{\|{\bf \hat{x}_2}\times ({\bf p}_2-{\bf p}_0)\|}$
  6. ${{\bf \hat{y}}}_2=\frac{{\bf \hat{z}_2}\times {\bf \hat{x}_2}}{\|{\bf \hat{z}_2}\times {\bf \hat{x}_2}\|}$
  7. ${\bf R}= [{{\hat{\bf x}}_2},{{\hat{\bf y}}_2},{{\hat{\bf z}}_2}]$

Questions:

  1. It is required that the Rotation matrix, ${\bf R}$, be obtained in closed form. I was expecting a simpler form. However, the end result turns out to be very complicated and is not solvable on paper. Can the problem be solved in a much simpler way?

  2. What are the flaws in this method? If the points are collinear, then the algorithm will fail.

  3. How can we determine the correctness of the solution?