<s>[INST] Compute the dihedral angle of a regular pyramid Given a regular pyramid, defined as a right pyramid with a base which is a regular polygon, with the vertex above the centroid of the base, I would like to compute the dihedral angle between adjacent faces, as well as the angle between a lateral face and the base, in terms of the number of sides and the slant edge length. Can someone walk through the calculation?
Using Google I found this helpful article about computing dihedral angles by Greg Egan. 

We have isosceles triangle $CAD$ above the plane of triangle $CBD$, making a dihedral angle of $\epsilon$. Triangle $CBD$ is the orthogonal projection of $CAD$, so also isosceles. The apex angle between adjacent edges in triangle $CAD$ is $\alpha$. The angle of triangle $CBD$ is $\beta.$ Edge $AC$ makes a slant angle of $\gamma$ with the projected edge $BC$.
There is a plane perpendicular to slant edge $AC$ through the opposite vertex $D$, which intersects edge $AC$ at point $F$, and $BC$ at point $G$. Angle $GFD$ is $\delta.$
If triangle $CAD$ is the side of a regular pyramid, and $CBD$ its base, then $2\delta$ will be the dihedral angle between adjacent faces, and $\epsilon$ will be the dihedral angle between slant face and base.
I can see that plane $DFG$ is perpendicular to slant edge $AC$, hence why triangles $AFD$ and $AFG$ are right triangles. But why are $DGC$ and $FGD$ right angles?
How do I arrive at $$\sin\delta=\cos(\beta/2)/\cos(\alpha/2)$$?
 [/INST] An alternate approach to obtaining the formula for $\delta$ is to take a unit normal $\underline{\mathbf{u}}$ for a given slope and then rotate this by the angle $\beta$ about the $z$-axis, ie about the vector $\underline{\mathbf{k}}$, to produce a unit normal $\underline{\mathbf{v}}$ for the adjacent slope, as shown in Fig. 1. This approach avoids the complication which arises when $\beta > 90^\circ$, for then $G$ is no longer on the line segment $BC$, but extends out to the left beyond $B$ (eg. in the case of the tetrahedron we have $\alpha = 60^\circ$ and $\beta = 120^\circ$, giving dihedral angle $2\delta = \arccos (1/3)$).

Since $\underline{\mathbf{u}}$ and $\underline{\mathbf{v}}$ are both outward pointing, we have :
$$
\underline{\mathbf{u}} \cdot \underline{\mathbf{v}} = \cos(180 - 2\delta) = -\cos 2\delta.
$$
From Fig. 1 we have :
$$
\underline{\mathbf{u}} = \sin \epsilon \; \underline{\mathbf{i}} + \cos \epsilon \; \underline{\mathbf{k}}.
$$
Rotating $\underline{\mathbf{u}}$ about the $z$-axis by angle $\beta$ leaves the $\underline{\mathbf{k}}$ component unchanged and changes the component $\sin \epsilon \; \underline{\mathbf{i}}$ to $\sin \epsilon \cos \beta \; \underline{\mathbf{i}} + \sin \epsilon \sin \beta \; \underline{\mathbf{j}}$ so that :
$$
\underline{\mathbf{v}} = \sin \epsilon \cos \beta \; \underline{\mathbf{i}} + \sin \epsilon \sin \beta \;\underline{\mathbf{j}} + \cos \epsilon \; \underline{\mathbf{k}}
$$
Thus :
\begin{eqnarray}
2 \sin^2 \frac{1}{2} \delta -1 = -\cos 2\delta & = & \underline{\mathbf{u}} \cdot \underline{\mathbf{v}} \nonumber \\
& = & \sin^2 \epsilon \cos \beta + \cos^2 \epsilon \label{eq:Rodrigues} \tag{1}
\end{eqnarray}
We require an expression that involves $\alpha$ and $\beta$ only. Denote the altitude of the regular pyramid by $h$, and the radius of its regular polygonal base by $r$. Then :
\begin{equation}
\sin \epsilon = \frac{h}{s \cos \frac{1}{2} \alpha}, \hspace{1em} \mbox{and} \hspace{1em} \cos \epsilon = \frac{r \cos \frac{1}{2} \beta}{s \cos \frac{1}{2} \alpha} \label{eq:angle-epsilon} \tag{2}
\end{equation}
with :
\begin{equation}
\frac{h}{s} = \sin \gamma \hspace{1em} \mbox{and} \hspace{1em} \frac{r}{s} = \cos \gamma. \label{eq:angle-gamma} \tag{3}
\end{equation}
As in the article we can readily establish by computing the length of EC in two ways that :
\begin{equation}
\cos \gamma = \frac{\sin \frac{1}{2} \alpha}{\sin \frac{1}{2} \beta}. \label{eq:angle-gamma-formula} \tag{4}
\end{equation}
Thus putting equations (\ref{eq:Rodrigues}) - (\ref{eq:angle-gamma-formula}) together we now have :
\begin{eqnarray*}
2 \sin^2 \frac{1}{2} \delta -1 & = & \frac{\sin^2 \gamma}{\cos^2 \frac{1}{2} \alpha} \cdot \cos \beta + \cos^2 \gamma \cdot \frac{\cos^2 \frac{1}{2} \beta}{\cos^2 \frac{1}{2} \alpha} \\
& = & \frac{1}{\cos^2 \frac{1}{2} \alpha} \left[ \left( 1 - \frac{\sin^2 \frac{1}{2} \alpha}{\sin^2 \frac{1}{2} \beta} \right) \cdot (\cos^2 \frac{1}{2}\beta - \sin^2 \frac{1}{2}\beta) + \left( \frac{\sin^2 \frac{1}{2} \alpha}{\sin^2 \frac{1}{2} \beta} \right) \cdot \cos^2 \frac{1}{2} \beta \right] \\
& = & \frac{1}{\cos^2 \frac{1}{2} \alpha} \left[ \cos^2 \frac{1}{2} \beta - \sin^2 \frac{1}{2} \beta + \sin^2 \frac{1}{2} \alpha \right] \\
\Rightarrow 2 \sin^2 \delta & = & \frac{1}{\cos^2 \frac{1}{2} \alpha} \left[ \cos^2 \frac{1}{2} \beta - \sin^2 \frac{1}{2} \beta + 1 \right] \\
& = & \frac{2 \cos^2 \frac{1}{2} \beta}{\cos^2 \frac{1}{2} \alpha} \\
\Rightarrow \mbox{since } \alpha, \beta, \gamma \in (0, 180^\circ), \hspace{1.5em} \sin \delta & = & \frac{\cos \frac{1}{2} \beta}{\cos \frac{1}{2} \alpha}.
\end{eqnarray*}
</s>