Associated Topics || Dr. Math Home || Search Dr. Math

### Angle Between Two Sides of a Pyramid

```
Date: 10/29/1999 at 10:59:41
From: Janice Lukens
Subject: Calculate the angle between two sides of a pyramid

Dear Dr. Math,

I have run into a problem that I am not sure how to solve. I make
stained glass lampshades and need the formula to calculate the angle
created by any two sides of the lampshade.

What I have is a pyramid with anywhere from 4 to 12 sides. The top
point of the pyramid is cut off, creating what I could determine from
your site is called a frustum of a pyramid. The dimensions that I
would know at any time are the lengths of all 4 sides of the
individual pieces and the number of pieces. I think that with the
correct formula I would be able to calculate the angle I need to have
between any two sides to solder them together.

While creating a 12-sided shade I used the angle of 150 degrees and
found that I only had enough room to attach 10 of the sides. There is
something about the compound angle that is created that I am missing.
I can see this but I am at a loss to figure out how to allow for it.

I hope you can understand this explanation. It is hard to describe
```

```
Date: 10/29/1999 at 16:29:53
From: Doctor Rob
Subject: Re: Calculate the angle between two sides of a pyramid

Thanks for writing to Ask Dr. Math, Janice.

Yes, with the correct formula, the angle can be calculated.

Can we assume that you have an isosceles trapezoid for each piece,
that is, something of this shape:

b
o-------------o
/               \
s /                 \ s
/                   \
o---------------------o
a

where a and b are parallel, and s and s are equal? You are given the
lengths a, b, and s, and the number of lateral faces, n. Then,
extending the sides to meet, we have a face of the full pyramid.

o
/ \
/   \
/     \
/       \
S /         \ S
/           \
o-------------o
/               \
/s               s\
/                   \
o---------------------o
a

This is an isosceles triangle with side S, where

S = a*s/(a-b),

which you can compute. Then the height of this triangle is

h = sqrt(S^2-[a/2]^2)

which you can also compute. The n edges of length a will form a
regular n-gon, which might look something like this:

a
o-----o
a /       \ a
/         \
o           o
\         /
a \       / a
o-----o
a

Let the angle 360/n be denoted by t. Then the distance from the center
to the midpoint of any side is

r = a/[2*tan(t/2)]

which you can also compute. The height of the pyramid H is given by

H = sqrt(h^2-r^2)

another quantity you can compute. Now if we set up a Cartesian
coordinate system with origin at the center of the base, base in the
xy-plane, and x-axis passing through one of the vertices of the base,
we can write down the coordinates of all of the vertices. The peak of
the pyramid is at (0,0,H). The other vertices have coordinates
(R*cos(k*t),R*sin(k*t),0), where

R = sqrt(S^2-H^2)

also computable, and k = 0, 1, 2, ..., n-1.

This is enough information to write down the equations of two adjacent
faces:

x + tan(t/2)*y + (R/H)*z = R
x - tan(t/2)*y + (R/H)*z = R

The directions perpendicular to those faces are given by the following
two vectors:

v1 = (1, tan(t/2), R/H)
v2 = (1, -tan(t/2), R/H)

The angle between the planes has cosine equal to the negative of the
dot product of these two vectors divided by both of their lengths:

cos(A) = -(v1.v2)/(|v1|*|v2|)

R^2 + (2*H^2+R^2)*cos(t)
= - ------------------------
2*H^2 + R^2 + R^2*cos(t)

Now it is just a matter of finding the Arccosine of this quantity to
get the angle A.

For example, if a = 10, b = 8, s = 6, and n = 12, you could compute

S = a*s/(a-b)
= 10*6/(10-8)
= 60/2
= 30

h = sqrt(S^2-[a/2]^2)
= sqrt(900-25)
= 5*sqrt(35)
= 29.5804

t = 360/12
= 30 degrees

tan(t/2) = tan(15)
= 2 - sqrt(3)

cos(t) = cos(30)
= sqrt(3)/2

r = a/[2*tan(t/2)]
= 10/[2*tan(15)]
= 5*(2+Sqrt[3])
= 18.6603

r^2 = 175 + 100*sqrt(3)
= 348.205

H^2 = h^2 - r^2
= 700 - 100*sqrt(3)
= 526.7949

R^2 = S^2 - H^2
= 200 + 100*sqrt(3)
= 373.2051

R^2+(2*H^2+R^2)*cos(t)
cos(A) = - ----------------------
2*H^2+R^2+R^2*cos(t)

1+18*sqrt(3)
= - ------------
35

= -.9193404

A = 156.83 degrees

The whole computation is complicated, but at least it is broken down
into relatively simple small steps. To express the angle in terms of
a, b, s, and n in a single formula, while possible, is extremely
complicated, and I feel that this approach is more useful.

I hope this is what you were seeking.  If not, write again.

- Doctor Rob, The Math Forum
http://mathforum.org/dr.math/
```
Associated Topics:
High School Coordinate Plane Geometry
High School Geometry
High School Higher-Dimensional Geometry
High School Practical Geometry
High School Triangles and Other Polygons
High School Trigonometry

Search the Dr. Math Library:

 Find items containing (put spaces between keywords):   Click only once for faster results: [ Choose "whole words" when searching for a word like age.] all keywords, in any order at least one, that exact phrase parts of words whole words

Submit your own question to Dr. Math
Math Forum Home || Math Library || Quick Reference || Math Forum Search