Find point position after rotation

106 Views Asked by At

There is a segment from the point $A = (0,y,0)$ to $B = (0,-y,0)$.

The segment will be rotated N degrees on $x$-axis (where $0<N<90$), as in the image below:

enter image description here

How can I find new positions for $A$ and $B$ ?

1

There are 1 best solutions below

3
On

Since you are rotating around the $x$-axis and your $z$-values are 0 they will remain constant. You can simply use the rotation matrix or complex numbers since a constant $z$ (especially $z=0$) is essentially a 2 dimensional rotation. The segment from $(0,y)$ to $(0,-y)$ is the line $x=0,$ for an $a\in[-y,y]$, rotating this point $N^\circ$ by use of the rotation matrix $\begin{bmatrix}\cos N^\circ&-\sin N^\circ\\\sin N^\circ&\cos N^\circ\end{bmatrix}\begin{bmatrix}0\\ a\end{bmatrix}=\begin{bmatrix}-a\sin N^\circ\\ a\cos N^\circ\end{bmatrix}$ so at $a=-y$ the coordinate is $(y\sin N^\circ,-y\cos N^\circ)$ and at $a=y$ we get $(-y\sin N^\circ,y\cos N^\circ)$ so the new segment is just from those two points with a $z$ coordinates of $0$.