Pyramid - Cartesian Space xyz I have a pyramid (in general with a rectangular base) like the following:

with:

*

*Angle: $\widehat{AVB} = 30°$

*Angle: $\widehat{BVC} = 40°$

*Edge $\overline{VO} = 100$.

It is in the space $xyz$, with the following configuration:

*

*Vertex $V$ overlaps the origin

*Vector $\overrightarrow{VO}$ creates an angle $\phi$ with positive y-axis and an angle $\theta$ with positive z-axis.

In the special case: if $\phi = \theta = 90°$ then the vector $\overrightarrow{VO}$ // positive x-axis, plane $ABCD$ // $yz-plane$, horizontal lines $BC$ and $AD$ and vertical lines $AB$ and $DC$.
I would to find the plane on which ABCD lies and coordinates $(x, y, z)$ for each point $A$, $B$, $C$, $D$ as function of $\phi$ and $\theta$.
 A: Define a local reference frame and attach it to the pyramid.  The reference frame sharing the same origin as the world reference frame relates the local coordinates of the points to the world coordinates, through a rotation matrix $R$ whose columns are the world coordinates of the three axes of the local frame.  In the case of the given pyramid, we can choose the $z$ axis to point from the origin $V$ towards the center of the base $O$, so that it is pointing in the negative world $z$ direction.  As for the local $x$ and $y$, then can be chosen along $BA$ and $AD$ respectively.
Now we can find the local coordinates of all the vertices using coordinate geometry.
Let $\overline{AB} = 2 a $ and $\overline{AD} = 2 b $, then we have the following coordinates of $A,B,C,D$
$A = (a, -b, 100)$
$B = (-a, -b, 100)$
$C = (-a, b , 100)$
$D = (a, b , 100) $
Since $\angle AVB = 30^\circ$, then $ -a^2 + b^2 + 10^4 = \dfrac{\sqrt{3}}{2} (a^2 + b^2 + 10^4) $ and since $\angle BVC = 40^\circ $ , then $ a^2 - b^2 + 10^4 = \cos 40^\circ (a^2 + b^2 + 10^4 ) $.  These two equations are linear equations in $a^2$ and $b^2$.
Solving these two equations gives us $ a \approx 28.6511 $ and $b \approx 37.6515 $
The world coordinates of the vertices are given by $p_0 = R p_1$, where $p_1$ is the local coordinates vector, and $p_0$ is the world coordinates vector.  In the default orientation, the matrix $R$ is given by
$R = \begin{bmatrix} -1 && 0 && 0 \\ 0 && 1 && \\ 0 && 0 && -1 \end{bmatrix}$
We can modify $R$ by rotating the local frame about an arbitrary axis through an arbitrary angle.    Two angles are necessary to determine the orientation of the axis, namely, the axis is given by $ u = (\sin \theta \cos \phi , \sin \theta \sin \phi, \cos \theta ) $.  And a third angle $\alpha$ determines the rotation angle about that axis.   The rotation matrix is given by the so-called "Rodrigues Rotation Formula"
$R = u u^T + (I - u u^T) \cos \alpha + S_u \sin \alpha $
where $S_u q = u \times q $ for any $q \in \mathbb{R}^3 $.
