When designing pyramid-shaped roofs one often needs the dihedral angle between adjacent roof facets. This article derives a compact formula for that dihedral angle θ\theta in terms of the roof pitch vv (the angle between the base plane and a joist running from a base corner to the apex) for a pyramid with a regular nn-gon base. The main result is a single closed form that covers any regular nn.

1Geometry setup

  • The base is a regular polygon with nn vertices (corners).
  • The apex is vertically above the center of the polygon; denote the vertical height by hh.
  • A joist runs from a base vertex to the apex and makes an angle vv with the base plane (the pitch).
  • We seek the dihedral angle θ\theta between two adjacent roof facets (the two triangular faces that meet along the roof ridge).

To analyze the geometry we use three helpful slices / views:

  1. a vertical cross-section through a base vertex and the apex (shows the joist pitch vv);
  2. the vertical plane containing the angle bisector of a base vertex (this is the symmetry plane that contains the ridge);
  3. the plan (top) view of the base polygon (to relate horizontal lengths by symmetry).
The Dihedral Angle of a Pyramid Roof with Regular Polygon Base

2Symmetry: where the ridge lies

Because the base is regular and the apex lies above the center, the two triangular facets adjacent to any chosen base vertex are mirror images with respect to the vertical plane that contains the angle bisector of that base vertex. Consequently:

  • the ridge (the line where those two facets meet) lies in that vertical bisector plane, and
  • the projection of the ridge onto the base plane is the angle bisector of the chosen vertex.

A small even/odd nuance:

for even nn (e.g. n=6n=6) the bisector passes through the opposite vertex; for odd nn it meets the midpoint of the opposite side. Either way, the ridge projects to the angle bisector, and the vertical plane through that bisector contains the ridge. This symmetry justifies the geometric decomposition used below.

3Base plan geometry

Let the interior angle at each vertex of the regular nn-gon be

α  =  π2πn. \alpha \;=\; \pi - \frac{2\pi}{n}.

The angle bisector splits α\alpha into two equal angles α2\frac{\alpha}{2}. Consider the right triangle formed in the plan view by the bisector and the direction of an adjacent side: call the horizontal (plan) distances in that triangle xx and zz so that zz is the leg along the bisector direction and xx is the leg along (the projection of) the side direction. By simple trigonometry in the plan:

zx  =  tan ⁣(α2)=tan ⁣(π2πn)=cot ⁣(πn). \frac{z}{x} \;=\; \tan\!\left(\frac{\alpha}{2}\right) = \tan\!\left(\frac{\pi}{2} - \frac{\pi}{n}\right) = \cot\!\left(\frac{\pi}{n}\right).

Thus the plan decomposes into symmetric segments x,xx,x and z,zz,z and

  z=xcot ⁣(πn)   \boxed{\;z = x\cdot\cot\!\left(\frac{\pi}{n}\right)\;}

(For a hexagon, n=6n=6, this gives zx=cot(π6)=3\frac{z}{x} = \cot(\frac{\pi}{6})=\sqrt{3}.)

4Relating vertical and horizontal components

Now introduce the vertical component yy that corresponds to the slanted joist. In the vertical cross-section through a base vertex and the apex the joist forms the pitch angle vv with the base plane. Using the right triangle in that vertical section we have

sinv  =  yxy  =  xsinv, \sin v \;=\; \frac{y}{x} \qquad\Longrightarrow\qquad y \;=\; x\,\sin v,

where xx is the (appropriate) slanted/horizontal reference length introduced above and yy is the corresponding vertical rise.

The dihedral angle θ\theta between the two symmetric facets can be related to the horizontal and vertical components: when you look in the bisector plane the half-angle θ2\tfrac{\theta}{2} satisfies

tan ⁣(θ2)  =  zy. \tan\!\left(\frac{\theta}{2}\right) \;=\; \frac{z}{y}.

Substitute z=xcot(πn)z = x\cot(\frac{\pi}{n}) and y=xsinvy = x\sin v to eliminate xx and obtain

tan ⁣(θ2)  =  cot(πn)sinv \tan\!\left(\frac{\theta}{2}\right) \;=\; \frac{\cot(\frac{\pi}{n})}{\sin v}

5Final closed form

Solving for θ\theta gives the compact general formula (valid for any regular nn-gon base):

  θ(v,n)  =  2arctan ⁣(cot(πn)sinv)  =  2arctan ⁣(1sinvtan(πn))  =  2arctan ⁣(cscvcot(πn))   \boxed{\; \theta(v,n) \;=\; 2\,\arctan\!\left(\frac{\cot(\frac{\pi}{n})}{\sin v}\right) \;=\; 2\,\arctan\!\left(\frac{1}{\sin v\,\tan(\frac{\pi}{n})}\right) \;=\; 2\,\arctan\!\left(\csc v\cdot\cot\left(\frac{\pi}{n}\right)\right) \;}

This expression connects the joist pitch vv and the polygon geometry (via nn) to the dihedral ridge angle θ\theta.

The formula is compact, works for any regular nn-gon, and cleanly reduces to the simple constants for square, hexagon, and other regular bases. It is directly useful for geometry problems as well as practical roof design calculations.

6Checks and useful special cases

  • Regular hexagon (n=6n=6):

    θ(v,6)  =  2arctan ⁣(3sinv) \theta(v,6) \;=\; 2\arctan\!\left(\frac{\sqrt{3}}{\sin v}\right)

  • Square (n=4n=4):

    θ(v,4)  =  2arctan ⁣(1sinv). \theta(v,4) \;=\; 2\arctan\!\left(\frac{1}{\sin v}\right).

  • Flat roof (v=π2v=\tfrac{\pi}{2}, facets lie in the base plane):

θ ⁣(π2,n)  =  2arctan ⁣(cot(πn))  =  π2πn \theta\!\left(\tfrac{\pi}{2},n\right) \;=\; 2\arctan\!\left(\cot\left(\frac{\pi}{n}\right)\right) \;=\; \pi - \frac{2\pi}{n}

i.e. the angle reduces to the interior angle of the base polygon at the vertex, as expected.

7Inverse relation

If θ\theta is known and the desired pitch vv is required,

sinv  =  cot(πn)tan(θ2)  v  =  arcsin ⁣(cot(πn)tan(θ2))   \sin v \;=\; \frac{\cot\left(\frac{\pi}{n}\right)}{\tan\left(\frac{\theta}{2}\right)} \quad\Longrightarrow\quad \boxed{\; v \;=\; \arcsin\!\left(\frac{\cot\left(\frac{\pi}{n}\right)}{\tan\left(\frac{\theta}{2}\right)}\right)\; }