Presume I have a yaw value. This yaw value represents a point on the circumference of a circle. This yaw value is absolute - meaning that it is locked to the y axis in a 3D world. Now, I have a pitch value; This pitch value is relative to the yaw, meaning that the yaw is set, and the pitch then follows an axis based on the direction the yaw is pointing to point to a point on the circumference of the relatively created circle. Theoretically, using pitch and yaw in this way, our pitch value can point towards any location in a sphere with a radius of both of the circles' radii.
Now, presume we want to take the pitch and yaw values, and pass them onto another object - put this one has a $x$, $y$, and $z$ rotation axis, and none are relative to each-other. How would we do this?
Some more info: distances around the circumference of the circles are measured in radians; It is assumed the circle's all have radii of 1.
My first attempt to solve this was to take the radians and convert them into $x$ and $y$ values. So I used the formula $x^2 + y^2 = r^2$, and used $x = \|cos(x)| * y$ to find the x rotation, and $\|sin(x)| * y$ to find the y rotation. The thought was that when working backwards like this, I could use the original x and y values from the formula and multiply them by $y$ to create a ratio as to how far each of these went; This sorta worked, but did not give the desired result.
Your answer is the Euler Angles.
Indeed, you could find more useful the Tait–Bryan angles, which express directly the angles $\psi$, $\theta$ and $\phi$ as the yaw, pitch and roll operation.
This standard sequence is denoted as $z-y'-x''$, meaning you first rotate in the $z$ axis, then in the $y$ axis, then in the $x$ axis, always with respect to your plane (intrinsic rotation).
From the reference article, the transformation matrix is: $$ R=Z_1 Y_2 X_3 = \begin{bmatrix} c_1 c_2 & c_1 s_2 s_3 - c_3 s_1 & s_1 s_3 + c_1 c_3 s_2 \\ c_2 s_1 & c_1 c_3 + s_1 s_2 s_3 & c_3 s_1 s_2 - c_1 s_3 \\ - s_2 & c_2 s_3 & c_2 c_3 \end{bmatrix} $$ where $1,2,3$ are the $\psi$, $\theta$ and $\phi$ are the yaw, pitch, roll angles; and $c,s$ are the $\cos,\sin$ functions.
from there you can easily check that $[1;0;0]$ transforms into $R[1;0;0]=[c_2;c_2s_1;-s_2]$, which is the correct value after a yaw-pitch (roll do not affect this vector).