transformation of 3D coordinate system

1k Views Asked by At

how to transform a cylinder from a coordinate system having orthogonal basis vectors $v_1$, $v_2$ and $v_3$ into another a coordinate system having orthogonal basis vectors $\begin{pmatrix}1\\0\\0\end{pmatrix}$, $\begin{pmatrix}0\\1\\0\end{pmatrix}$ and $\begin{pmatrix}0\\0\\1\end{pmatrix}$.

1

There are 1 best solutions below

2
On

Make a Rotation Matrix from the vectors $u$, $v$ and $w$ by arranging them in columns such that:

$$R=\begin{pmatrix}u&v&w\end{pmatrix}=\begin{pmatrix}u_x&v_x&w_x\\u_y&v_y&w_y\\u_z&v_z&w_z\end{pmatrix}$$

Now any vector $a=\begin{pmatrix}a_x\\a_y\\a_z\end{pmatrix}$ is transformed from the local coordinates to the world coordinates with vectors $\mathcal{i}=\begin{pmatrix}1\\0\\0\end{pmatrix}$, $\mathcal{j}=\begin{pmatrix}0\\1\\0\end{pmatrix}$ and $\mathcal{k}=\begin{pmatrix}0\\0\\1\end{pmatrix}$ by simple matrix multiplication

$a_{world}=Ra=\begin{pmatrix}u_xa_x+v_xa_y+w_xa_z\\u_ya_x+v_ya_y+w_ya_z\\u_za_x+v_za_y+w_za_z\end{pmatrix}$

thats it.