I have a line with equation $x_i = a_i t + b_i$, for $i = 1, 2, 3$ (if such way not good i can use any other) with which matrix i can transform this line into $y$-axis? I need to do polenty of calculation around this line and its much easy to do it with $y$-axis than with this line. Thanks.
Matrix for transform line into y-axis
0
$\begingroup$
geometry
3d
1 Answers
1
Well, using a matrix only (by matrix multiplication) will fix the origo, so in the end a translation is also needed.
For parallel line to the $y$-axis, the direction vector $a=(a_1,a_2,a_3)^T$ should go to $(0,1,0)^T$. Probably the best if you can extend $a$ to an orthonormal basis, finding (column-) vectors $u,v$ such that $|u|=|a|=|v|=1$ (instead of $a$, we can take $a/|a|$) and $a\perp u$, $a\perp v$, $u\perp v$.
Then consider the matrix $M=[u|a|v]$, it will satisfy $M\cdot\begin{bmatrix} 0\\1\\0 \end{bmatrix} = a$, and $M^T=M^{-1}$ and $x\mapsto M^T (x-b)$ will take your line $x=t\cdot a+b$ to the $y$-axis, and the inverse transformation is: $y\mapsto My + b$