Angle between two planes I'm hoping that this is an easy problem.
I have a vector which is normal to a plane in 3D space. What I want to do is find the angle of this plane relative to a plane parallel to the y axis.
The problem is I have a 4 sided pyramid 

When looking from the top I want to find the angle between the surface normal and the Y axis. So for this example it should be 135 degrees or 45 degrees depending on direction. The points of the triangle are (-49.49747, 0.0, 0.0), (0.0, -49.49747, 0.0), (0.0, 0.0, 70.0) and the surface normal is (-0.6324555, -0.6324555, 0.4472136).
This is for a project I am working on and I can get it working when the faces of the object are vertical, but once there are 3D involved my formulas don't work and I'm not sure what exactly I need to do to get the correct answer.
Any help would be great.
Thanks
Nick
 A: For any plane, you can find a normal vector for that plane. In particular, if a plane is given by $ax + by + cz + d = 0$, then $(a,b,c)$ is a normal vector for that plane. Then, to find the angle between any two planes, you merely need to calculate the angle between their normal vectors. So suppose we have two planes $P_1, P_2$, and they have normal vectors $n_1, n_2$. Then the angle $\theta$ between them can be calculate according to the inner product formula
$$ n_1 \cdot n_2 = \| n_1 \| \|n_2\| \cos{\theta} $$
where $n_1 \cdot n_2 = a_1 a_2 + b_1 b_2 + c_1 c_2$ if $n_i = (a_i, b_i, c_i)$, and $\|n_i\| = \sqrt{a_i^2 + b_i^2 + c_i^2}$.
This method generalizes to hyperplanes (codimension 1) for arbitrarily many dimensions.
A: (Was a comment, is now an answer)
You want to flatten the vector into the $xy$ plane, then get the angle, right? Then just make the $z$ component of $u$ be $0$. So for an explicit formula:
$$\theta = \arccos \frac{u' \cdot v}{|u'||v|} = \arccos \frac{u_x v_x + u_y v_y}{\sqrt{u_x^2+u_y^2}\sqrt{v_x^2+v_y^2}} = \arccos \frac{u_y}{u_x^2 + u_y^2}$$
