1
$\begingroup$

I'm trying to reflect the "world" through a specified plane $p:Ax+By+Cz=0$. I know how to reflect the "world" through the $xy$-plane, so I want to rotate $p$ in the $3$ axes ($x,y,z$-axes) so it will be contained in the $xy$-plane, which means its normal will be $(0,0,1)$.

That's why I want transform $p$'s normal to $(0,0,1)$. I'm trying to solve this using the three rotations with known transformations:

Rotation about the $z$-axis for example:

\begin{pmatrix} \cos A & -\sin A & 0 \\ \sin A & \cos A & 0 \\ 0 & 0 & 1 \end{pmatrix} So, using only this kind of matrix (for the $x$- and $y$-axes too) I would like to transform $(A,B,C)$ to $(0,0,1)$.

Thank you so much for helping.

$\endgroup$
6
  • $\begingroup$ Three times is too much, it creates indeterminacy on the angles. $\endgroup$
    – user65203
    May 6 '15 at 11:16
  • $\begingroup$ @George S I will not fight a LaTeX/MathJax formatting war. $\endgroup$ May 6 '15 at 11:16
  • $\begingroup$ I don't understand? $\endgroup$
    – user230715
    May 6 '15 at 11:17
  • $\begingroup$ correction: ... NOT fight ... $\endgroup$ May 6 '15 at 11:18
  • $\begingroup$ I'm not fighting anyone. $\endgroup$
    – user230715
    May 6 '15 at 11:19
3
$\begingroup$

First rotate around $X$ with angle $-\arctan(B/C)$ to cancel $B$

$$(A,B,C)\to(A,0,C'),$$

Then rotate around $Y$ with angle $-\arctan(A/C')$ to cancel $A$

$$(A,0,C')\to(0,0,C'').$$

$\endgroup$
4
  • $\begingroup$ Assuming I need to execute the transformations one after another given only (A,B,C) ? without calculating the angle arctan(A/C') as this is something I can't do without calculating the first rotation? $\endgroup$
    – johni
    May 6 '15 at 17:35
  • 1
    $\begingroup$ $C'=\sqrt{B^2+C^2}$ and $C''=\sqrt{A^2+B^2+C^2}$, obviously. $\endgroup$
    – user65203
    May 6 '15 at 17:42
  • $\begingroup$ Assuming the (A,B,C) = (1,0,0), we divide by zero. What do you say? $\endgroup$
    – johni
    May 6 '15 at 17:45
  • $\begingroup$ No problem. For the first rotation the angle is arbitrary and the second, $\pi/2$. The equations are coherent. $\endgroup$
    – user65203
    May 6 '15 at 17:47
2
$\begingroup$

What you want to do is rotate your vector $(A,B,C)^T$ three times, around each axis, and find the appropriate angles of rotation. You can write: $$\begin{pmatrix}0\\0\\1\end{pmatrix}=R_X\cdot R_Y\cdot R_Z\cdot\begin{pmatrix}A\\B\\C\end{pmatrix}$$ $$\begin{pmatrix}0\\0\\1\end{pmatrix}=\begin{pmatrix}1&0&0\\0&\cos X&-\sin X\\0&\sin X&\cos X\end{pmatrix}\begin{pmatrix}\cos Y&0&\sin Y\\0&1&0\\-\sin Y&0&\cos Y\end{pmatrix}\begin{pmatrix}\cos Z&-\sin Z&0\\\sin Z&\cos Z&0\\0&0&1\end{pmatrix}\begin{pmatrix}A\\B\\C\end{pmatrix}$$ Now you can multiply these matrices, and you should end up with a system of three equations with three unknowns, namely the angles $X$, $Y$ and $Z$.

$\endgroup$
1
  • $\begingroup$ I don't think this is the best option as this is like "brute forcing" the angles. There must be a way to calculate the angels like @Yves Daoust suggested, just without the need of calculating the second angle after calculating the first transformation. $\endgroup$
    – johni
    May 6 '15 at 17:43
0
$\begingroup$

For a detailed algorithm you look here: http://inside.mines.edu/fs_home/gmurray/ArbitraryAxisRotation/

This is what @Yves suggested, in a more detailed way.

Thank you all!

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.