Consider an $(x, y, z)$ system where positive $x$ points to the right, positive $y$ points upwards, and positive $z$ points outside of the screen.
I create a new system $(x', y', z')$ by applying two rotations:
- Counter-clockwise rotation of $(x, y, z)$ around the $z$ axis, an angle $\theta$. This generates an intermediate system $(x_i, y_i, z_i)$, where $z_i=z$.
- Clockwise rotation of the $(x_i, y_i, z_i)$ system around the $x_i$ axis, an angle $\phi$. This generates the final $(x', y', z')$ system.
I know both $\theta, \phi$ angles. I also know the transformation equations between both systems $(x, y, z)$ and $(x', y', z')$:
$$ x' = x\,cos\theta + y\,sin\theta \\ y' = -x\,sin\theta\,cos\phi + y\,cos\theta\,cos\phi - z\,sin\phi \\ z' = -x\,sin\theta\,sin\phi + y\,cos\theta\,sin\phi + z\,cos\phi $$
What I need is the equation for the plane defined by $(x', y')$, in the form:
$$ax+by+cz+d=0$$
How can I calculate this equation?