## Angles in a Pyramid

Consider a pyramid with a base of a regular N-gon.  All other sides are triangles and every edge is of unit length.
1. What is the maximum N?
2. What is the angle between the base and a side?
3. What is the angle between two adjacent sides?

Source: Sudipta Das.

Solutions were received from Sudipta Das, Philippe Fondanaiche, and Alan O'Donnell.
Alan's Solution:
```There are only 3 solutions to this, N=3,4,5.
N=1 produces a trivial 1-dimensional solution
N=2 and N=6 produce 2-dimensional solutions.

* The apex of the pyramid is above the centroid of the N-gon.
* The altitude of a unit equilateral triangle (each face) is sqrt(3)/2
* The pyramid base (N-gon) can be drawn as N isosceles triangles, base legth
1, with angles 90(1-(2/N)),90(1-(2/N)),360/N
* The generic altitude of these triangles is 1/(2 tan(180/N))

** The generic angle of elevation = acos(1/(sqrt(3)tan(180/N)))

Base-face elevations:
=====================

For N=3 (equilateral triangle base): [tan(60)=sqrt(3)]
Angle between base and side is acos(1/3) ~= 70.5288 deg.

For N=4 (square base): [tan(45)=1]
Angle between base and side is acos(1/sqrt(3)) ~= 54.7356 deg.

For N=5 (pentagon base): [tan(36)=sqrt(5 - 2sqrt(5))]
Angle between base and side is acos(1/(sqrt(15-6sqrt(5)))) ~= 37.3774 deg.

For N=6 (hexagon base): [tan(30)=1/sqrt(3)]
Angle between base and side is acos(1) = 0.0000 deg.

Higher N yield acos(n>1) so not possible.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Face-face angles:
=================

The shortest route between 2 non-adjacent corners, over the surface will
meet the intersection of these (equilateral triangle) faces perpendicularly.
Therefore this path bisects each face, and has length 2 * sqrt(3)/2. The
triangle formed between these lines and the base line produce the angle
between the faces.

The distance across the base between corners 2 apart is:
a^2 = b^2+c^2-2bc.cos(x) [cosine rule]
a^2 = 2(1-cos(x)) [since all lengths are unit]
Internal angles (x) of regular N-gon = 180(1-(2/N))

N=3: x=60; a^2 = 1 [a = 1]
N=4: x=90; a^2 = 2 [a ~= 1.414]
N=5: x=108; a^2 = (3+sqrt(5))/2 [a ~= 1.618]  [note cos(108) =
(1-sqrt(5))/4]
N=6: x=120; a^2 = 3 [a ~= 1.732]

Rearranging the cosine rule, we also get:

x = acos((b^2+c^2-a^2)/2bc).
[note: b = c = sqrt(3)/2; b^2+c^2 = 3/2 and 2bc=3/2]

N=3: x = acos(1/3) ~= 70.5288 deg. [same as elevation, as expected!]
N=4: x = acos(-1/3) ~= 109.4712 deg.
N=5: x = acos(-sqrt(5)/3) ~= 138.1897 deg.
N=6: x = acos(-1) = 180 deg. [as expected, this is flat!]```

Mail to Ken