# UnitMath Example: ( Pyramids With 3 sides ) Last Modified 12/8/1999

### email Examples FAQ Home Sales \$\$\$ What's New Windows demo

I have tried to make sure the following formulas are correct, but I do not guarantee them.

Regular - Truncated Pyramid With 3 Sides

Regular - Full Pyramid with 3 sides

## Regular - Truncated Pyramid With 3 Sides TOP

The following drawing shows 3 views of a truncated pyramid with 3 sides.

Starting with the information given above we are to find the information needed to cut each side of the pyramid. Due to symmetry all three sides have the same dimensions. The next figures show the information we need to find.

### One side of a Regular - Truncated Pyramid TOP Following are several example calculations. The calculations assume that angle <= 90 degrees. Example 1, I verified with a CAD program, example 2 is obviously true. ( See angle notes )

### Example1: 60 deg TOP

"Define the givens"
angle: 60 deg;
base: foot;
thickness: 1 inch;
height: 3 inches;

"Define points T, A, & B"
Tz: height; Ty: Tz/tan(angle); Tx: Ty/tan(30 deg);
T: Tx `i + Ty `j + Tz `k;

Ax: ft; Ay: 0 ft; Az: 0 ft;
A: Ax `i + Ay `j + Az `k;

By: thickness /sin( angle); Bx: By/tan(30 deg) as in; Bz: 0 ft;
B: Bx `i + By `j - Bz `k;

"Define the Normals"
NTOB: T cross B;
NAOT: A cross T;

"Find the angles"
angle_1: acos( T dot A / ( abs(T) abs(A) ) ) as deg; ~ 49.107 deg
angle_2: 180 deg - acos( NTOB dot NAOT / ( abs( NTOB ) abs( NAOT ) ) ) as deg ~ 41.410 deg

"Find the top & width"
OT: abs( T ) as in & (in/16) ~4 in + 9.321 in/16
width: Tx tan(angle_1) as inch & (in/16); ~ 3 inch + 7.426 (in/16)
top: base - 2 Tx as ft & in; = 6 in

### Example2: angle = 90 deg TOP

"Define the changes from example 1"
angle: 90 deg;

"Find the angles and dimensions"
angle_1; = 90 deg
angle_2 = 30 deg

width; ~ 5 inch + 3.138 (in/16)
top; = ft

### Example3: angle = 45 deg TOP

"Define the changes from example 2"
angle: 45 deg;

"Find the angles and dimensions"
angle_1; ~ 39.232 deg
angle_2 ~ 52.239 deg

width; ~ 4 inch + 3.882 (in/16)
top; ~ 1.608 in

### Truncated Pyramid Derivation TOP

Motivation:

Given angle1 & angle2 all the other calculations are fairly simple, so I will concentrate on those angles. The three points T, O, & A, define vectors OT & OA, and angleTOA ( angle1 ) can then be found using the formula: "OT dot OA = | OT | | OA | cos( angleTOA )" or "acos( OT dot OA / ( | OT | | OA | ) )". Angle2 can be found from the normals to the two surfaces TOA & TOB. Therefore I need to find points B, T, O, & A

Axis:

Judicious choice of axis simplifies everything, so place O on the left side of Part with coordinants ( 0,0,0 ) . Define the x axis to be parallel to the base of the part, the z axis to be pointing up from the base, the y axis is then given by the right hand rule.

The following points are used in this derivation:
Point O is the origin located on the intersection of front Part & left Part on the outside of the pyramid.
Point T is above point A on the intersection of front Part & left Part on the outside of the pyramid.
Point A is any point on the x axis to the right of point A.
Point B is the intersection of front Part & left Part ( on the inside of the pyramid ) & where z = 0.

With O at the origin vector OA has the same coordinates as A, vector OT as T, and vector OB as B. With this selection of points the angles found are for the sides of the Part. The following figures show the locations of the various points. The next figure shows how Tz, Ty, & By can be found. Given Ty and By, Tx and Bx can be found using the formula tan ( 30 deg ) = y/x. Bz = 0 by design. ### Your Own Calculations for a Truncated Pyramid with 3 sides TOP

1. Open UnitMath on your computer. If needed see downloads for Macintosh or Windows.

2. Copy the following text into UnitMath.

"------ Define the Givens CHANGE THESE ------"
angle: 60 deg;
base: foot;
thickness: 1 inch;
height: 3 inches;

"------ IN GENERAL DON'T CHANGE THESE ------ "
Tz: height; Ty: Tz/tan(angle); Tx: Ty/tan(30 deg);
T: Tx `i + Ty `j + Tz `k;

Ax: ft; Ay: 0 ft; Az: 0 ft;
A: Ax `i + Ay `j + Az `k;

By: thickness /sin( angle); Bx: By/tan(30 deg) as in; Bz: 0 ft;
B: Bx `i + By `j - Bz `k;

NTOB: T cross B;
NAOT: A cross T;

angle_1: acos( T dot A / ( abs(T) abs(A) ) ) as deg;
angle_2: 180 deg - acos( NTOB dot NAOT / ( abs( NTOB ) abs( NAOT ) ) ) as deg;

angle_1Gauge: 90 deg - angle_1 as deg; angle_2Gauge: 90 deg - angle_2 as deg;
OT: abs( T ) as ft & in;
width: Tx tan(angle_1) as inch & (in/16);
top: base - 2 Tx as ft & in;

"------ The Results will be here after the calculation ------"

angle_1;
angle_1Gauge;
angle_2;
angle_1Gauge;

OT;
width;
top;

"------ Stop Copying Here ------"

3. Change the Givens
For example:
angle: 50 deg;
base: 2 feet;
thickness: 1/2 inch;
height: 9 inches;

4. Select all the text that you pasted in Step 2 and evaluate it.
Your results will be at the end of the text. Before building see angle notes.

## Full Pyramids with 3 Sides TOP

The following drawing shows 3 views of a full pyramid with 3 sides.

Starting with any two pieces of the above information, we are to find the information needed to cut each side of the pyramid. Due to symmetry all three sides have the same dimensions. The next figures show the information we need to find.

### One side of a Full Pyramid TOP Following are several example calculations. ( See angle notes )

### Example1: Given base and height TOP

"Define the givens"
base: 3 inch;
height: 3 inch;

"Define points T, A, & B"
Tz: height; Ty: Tx * tan( 30 deg ); Tx: base / 2;
T: Tx `i + Ty `j + Tz `k;

A: ft `i + 0 m `j + 0 m `k;

Bz: 0 inch; By: Bx * tan( 30 deg ); Bx: inch;
B: Bx `i + By `j - Bz `k;

"Define the Normals"
NF: A cross T;
NC: T cross B;

"Define the other parts"
angle_1: acos( T dot A / ( abs(T) abs(A) ) ) as deg;
angle_2: 180 deg - acos( NF dot NC / ( abs( NF ) abs( NC ) ) ) as deg;
width: Tx tan( angle_1 ) as in & in/16;
angle: atan( Tz / Ty ) as deg;

"Show the Results"
angle_1; ~ 64.3 deg
angle_2; ~ 33.7 deg
width; ~ 3 in + 2.0 in/16
angle; ~ 73.9 deg

### Example2: Given base and angle TOP

"Define the changes from example1"
base: 3 inch;
angle: 74 deg;

"Redefine point T and define height"
Tz: Ty * tan( angle ); Ty: Tx * tan( 30 deg ); Tx: base / 2;
height: Tz as in & in/16;

"Show the Results"
angle_1; ~ 64.5 deg
angle_2; ~ 33.6 deg
width; ~ 3 in + 2.3 in/16
height; ~ 3 in + 0.3 in/16

### Example3: Given height and angle TOP

"Define the changes from example2"
height: 3 inch;

"Redefine point T and define base"
Tz: height; Ty: Tz / tan( angle ); Tx: Ty / tan( 30 deg);
base: 2 Tx as in & in/16;

"Show the Results"
angle_1; ~ 64.5 deg
angle_2; ~ 33.6 deg
width; ~ 3 in + 1.9 in/16
base; ~ 2 in + 15.7 in/16

### Full Pyramid Derivation TOP

This derivation is very similar to the derivation for the "Truncated Pyramid". The next figures show how Tz, Ty, & Tx can be found. ### Your Own Calculations for a Full Pyramid with 3 sides TOP

The following calculations are for the case where you are given the base and height of the pyramid. In other cases you will have to modify: what is given, the definition of point T, and what is displayed.
1. Open UnitMath on your computer. If needed see downloads for Macintosh or Windows.

2. Copy the following text into UnitMath.

"------ Define the Givens CHANGE THESE ------"
base: 3 inch;
height: 3 inch;

"------ IN GENERAL DON'T CHANGE THESE ------ "
Tz: height; Ty: Tx * tan( 30 deg ); Tx: base / 2;
T: Tx `i + Ty `j + Tz `k;

A: ft `i + 0 m `j + 0 m `k;

Bz: 0 inch; By: Bx * tan( 30 deg ); Bx: inch;
B: Bx `i + By `j - Bz `k;

NF: A cross T;
NC: T cross B;

angle_1: acos( T dot A / ( abs(T) abs(A) ) ) as deg;
angle_1Gauge: 90 deg - angle_1 as deg;
angle_2: 180 deg - acos( NF dot NC / ( abs( NF ) abs( NC ) ) ) as deg;
angle_2Gauge: 90 deg - angle_2 as deg;
width: Tx tan( angle_1 ) as in & in/16;
angle: atan( Tz / Ty ) as deg;

"------ The Results will be here after the calculation ------"
angle_1;
angle_1Gauge;
angle_2;
angle_2Gauge;

width;
angle;

"------ Stop Copying Here ------"

3. Change the Givens
For example:
base: 2 ft + 9 inches;
height: 1 foot + 2 inch;

4. Select all the text that you pasted in Step 2 and evaluate it.
Your results will be at the end of the text. Before building see angle notes.