This question comes from the work that constructing the general cylinder by the NURBS. I have implemented the point-set $P_1,P_2,\cdots,P_n$ that in the $O-xyz$ plane, now I want to implement the point-set that in the plane $O_1-x_1y_1z_1$. So I need to transform the coordinate of $P_1,P_2,\cdots,P_n$ from the CS $O-xyz$ to CS $O_1-x_1y_1z_1$ firstly.
Given that I have a set of points $P_1,P_2,\cdots,P_n$ in the $O-xyz$ plane. Please see the following schematic diagram. Here, $P_i=\{x_i,y_i,0\}$
Now I would like to transform these points to other coordinate system($O_1-x_1y_1z_1$).
My trial
I believe that the key step is solving the transformation matrix between coordinate system ($O-xyz$) and coordinate system ($O_1-x_1y_1z_1$).
- Step1: Using the translational transformation $ \begin{pmatrix} 1 && 0 && 0 && O_{1x}\\ 0 && 1 && 0 && O_{1y}\\ 0 && 0 && 1 && O_{1z}\\ 0 && 0 && 0 && 1 \end{pmatrix} $
- Step2: Using the composite rotational transformation.
For the second step, I discovered the Euler-angle reference in Wiki-Encyclopedia.
However, I didn't know how to confirm the angles like $\alpha$ and $\gamma$ via the $\vec{O_1z_1}=\{n_x,n_y,n_z\}$owing to that I am struggling to understand $\vec{N}$ axis.
For the angle $\beta$, it is easy to compute. Namely,
$$\cos\beta=\frac{n_z}{\sqrt{n_x^2+n_y^2+n_z^2}}$$
Question
I have searched the DOC of Wolfram Mathematica by the keyword Euler
in V9. Unfortunately, I cannot find the help info.
- Is there related built-in about Euler-angle transformation in Mathematica?
- Or how to do the Euler-angle transformation?
EulerAngles
... (not helpful if you are on V9). Have you searched the site yet (mathematica.stackexchange.com/search?q=euler+angle)? David Park´s addon contains Euler-related functions, too (which used to be free when I started out with Mathematica). $\endgroup$online DOC
and then I discovered thatEulerAngles[]
was introduced inV10.2
. $\endgroup$