Go
 
 
 
 
 
 
 

Dome Calculations on Palm Handhelds

By David South Jr

I bought my first Palm Pilot in 1996. It had a pathetic calculator. It couldn't even do square roots. Without something like a square root, I could not do any dome calculations.

My favorite calculator at the time was an HP 42S. I still have it. All HP scientific calculators at the time used Reverse Polish Notation for calculations. So when I searched for a calculator on the Palm, I wanted one which used RPN.

I found a wonderful RPN calculator for the Palm written by Russ Webb -- appropriately called RPN. Russ wrote RPN as a very compact and extensible calculator. You can write simple 'programs' known as scripts to run on RPN. I immediately wrote a simple one to calculate common elements of a spherical domes -- floor area, surface area, volume, and circumference. Since then, I added more to the script and created a second script for ellipsoid calculations.

Today, nearly everyone at Monolithic has a Palm Handheld. RPN and the dome scripts are an invaluable tool we use every day.

Installation

Russ Webb's Nth Lab has an excellent website with instructions to download and install RPN on your Palm Handheld.

Nth Lab's RPN Website:
http://www.nthlab.com/software/rpn/welcome.html

Go download RPN and install it on your Palm Handheld. There are manuals and tutorials. If you are unfamiliar with Reverse Polish Notation, please use the tutorial. Reverse Polish Notation is extremely powerful. I highly recommend you learn it. You can do far more complicated calculations with it than any other way.

Copy and paste the following code into a memopad entry on your Palm.

---------- Start after this line ------------
RPN: Sphere 2.0

RPN.1.c
[p]#'3.14159265';
[r]xaH2Pxb2P+xb2*/;
[l]Cr2PCrxb-xc+2P-s;
"Sphere"
"d"Xa;
"h"Xb;
"l"Xc;
"Lr"Cl;
"La"Cl2PCp*;
~
"D"xa;
"H"xb;
"L"xc;
"SD"Cr2Cr2P*xb2P-xaH2P-2Cr2P*/O*;
"Vl"1Cp*3/xb2P*Cr3*xb-*;
~
"Rc"Cr;
"Cc"xaCp*;
"Fa"xaH2PCp*;
"Sa"Cp2*xb*Cr*;
"Pi"Cp;
---------- End before this line -------------

And copy and paste this code into a different memopad entry on your Palm.

---------- Start after this line ------------
RPN: Oblate 1.2

RPN.1.m
[p]#'3.14159265';
[a]2PCp*;
[c]2*Cp*;
[x]2Pxa2P*xb2P/nxa2P+s;
[r]xbxh-Cx;
[k]xhxc/Xk;
[j]xbxk-g1XjCxXi;
[l]Czxk*Cp*2*Xl;
[f]xiXfxjXgxjxk-g1XjCxXi;
[t]xfCcxiCc+Hxfxi-2Pxgxj-2P+s*;
[y]xdH2Pxhxe2P*/xh+H;
[z]xi2Pxk2P-xk2*/xk+;
"Oblate"
"a"Xa;
"b"Xb;
"h"Xh;
"d"Xd;
"e"Xe;
"n"Xc;
~
"A"xa;
"B"xb;
"H"xh;
"D"xd;
"E"xe;
"N"xc;
~
"ab"CyXbxdH2P1Cyg1xh-2Pr22P/-/sXa;
"de"Cr2*Xdxaxb/Xe;
"l"Xm;
"Lr"xbxh-xm+Cx;
"La"xbxh-xm+CxCa;
~
"Rt"CkCjCz;
"Cc"xdHCc;
"Fa"xdHCa;
"Sa"CkxcVCjCl_v{_vCfCtxl+Xl}xl;
"Pi"Cp;
---------- End before this line -------------

Hotsync your Palm. Go to the memopad entry for either script. Select the script starting at the RPN.x.x line and ending at the bottom of the script. Copy that to the Palm's clipboard. Go to the RPN calculator. Hit the menu button, select script and then add script. The script will show up in the scripts section on RPN. Repeat for the second script.

For more details on installing and using scripts on RPN, please visit the RPN website.

Sphere

The easiest script to understand (and certainly to write) is the Sphere script. It only requires the diameter and height of the dome, everything else is calculated.

This is roughly what the script looks like in RPN.

-----------------
 d  h  l  Lr  La
 D  H  L  SD  Vl
 Rc Cc Fa Sa  Pi
-----------------

Here are the common functions:

  • d - Diameter. Put the diameter on the stack and hit 'd' to store it.
  • h - Height. Put the height on the stack and hit 'h' to store it.
  • D - This will output the diameter onto the stack.
  • H - This will output the height onto the stack.
  • SD - Surface Distance. When pressed it will calculate and output the distance from apex of the dome, along the surface of the dome down to its base. IMPORTANT: RPN must be set to Radians for this to work!
  • Vl - Volume. Press this to calculate and output the total volume of the dome.
  • Rc - Radius of Curvature. Calculates the Radius of Curvature of the sphere.
  • Cc - Circumference. Calculates the circumference of the dome.
  • Fa - Floor Area. Calculates the area of the floor at the base of the dome. The only variable it needs is 'd'. So if you are in a hurry, just put in 'd' and hit 'Fa'.
  • Sa - Surface Area. Calculates the Surface Area of the dome.

I added a special subset of functions which are useful for calculating second floors and head-clearance.

  • l - Level. Put the height in question here and hit 'l' to store it. Common heights are 9' foot second floors, 6' 8" for door heights, and 6' for head clearance.
  • L - Output Level. Outputs the level to the stack.
  • Lr - Level Radius. Calculates the radius to the dome at the level.
  • La - Level Area. Calculates the area at the level. Useful for calculating the second floor area.

And finally, I added 'Pi' to output Pi to the stack because I got tired of typing 3.14159265 everytime I needed it. :)

Oblate

I wrote the Oblate scripts much later. I've tried for years to come up with a good way to calculate oblate ellipsoid surface areas. I've never found a reasonable formula for doing so. So I wrote a script which slices up the dome and adds up the area of each slice. Because of this, more information is required and the surface area is only an approximation.

All ellipsoids (and spheres for that matter) must have at least three measurements: The semi-major axis, semi-minor axis, and height. An ellipsoid also has two other properties: diameter and ellipticity. And finally, to calculate the surface area, the script needs to know how many slices to use.

All five variables (a, b, d, h, e, and n) must be set before anything will calculate properly!

The 'n' variable is easy, it represents the number of slices for surface area calculations. Usually 20 slices will do. You can use 100 slices for much more accurate calculations, but it usually takes a long time to do.

As for the other variables, you only need to know three. Either you need the semi-major axis, semi-minor axis, and height -- or you need to know the diameter, height, and ellipticity of the dome. The script will calculate the missing variables.

Here is what it looks like:


-------------------
 a  b  h  d  e  n
 A  B  H  D  E  N
 ab  de  l  Lr  La
 Rt  Cc  Fa Sa  Pi
-------------------

Normally you would enter the oblate ellipsoid this way:

  • a - The semi-major axis. Put it on the stack and hit 'a' to store it.
  • b - The semi-minor axis.
  • h - Height.
  • de - Calculate Diameter/Ellipticity. Once you enter the a, b, and h variables, HIT THIS 'de' button to calculate the diameter and ellipticity of the ellipsoid. This finishes out the variables for the ellipsoid and you can hit the calculate/output buttons on the bottom row.

Or you can alternatively enter the ellipsoid this way:

  • h - Height.
  • d - Diameter.
  • e - Ellipticity. The ellipticity of a dome is the ratio of the semi-major axis divided by the semi-minor axis. For oblate ellipsoids it will be a number greater than 1.0. For prolate ellipsoids, the ellipticity is less than 1.0. For sphere's it is exactly 1.0.
  • ab - Calculate the Semi-Major/Semi-Minor axes. After entering h, d, and e, HIT 'ab' to calculate the semi-major and semi-minor axes. Once this is done, you can calculate the rest.

Make sure to set 'n' usually to 20.

The rest of the formulas work like the Sphere Script:

  • A B H D E N - Pressing any of these will output their respective values (semi-major, semi-minor, height, diameter, ellipticity, number of slices).
  • Rt - Radius of the Top. Useful in finding the maximum radius of curvature of the ellipsoid.
  • Cc - Circumference of the base.
  • Fa - Floor area.
  • Sa - Surface area. NOTE: This calculation takes time. You can see it working by watching the small black bar rise and fall in the stack area. It will take about five seconds if 'n' is set to 20. It will take longer if 'n' is set higher. REMEMBER, this surface area is an approximation, but is should be close enough for practical purposes. At 20 slices, the error on a house size dome is about one to two square feet. At 100 slices, it is far more accurate, but it takes a very long time.

The other items, l, Lr, La, and Pi work exactly the same as the sphere script.

Oblate Examples

House. Let's say I want to build a 32' d x 12' h oblate ellipsoid on top a 5' stem wall. Houses are usually a half-ellipsoid and this is no exception. That means the semi-major axis is 16' and the semi-minor axis is 12'.

Save 16 into 'a', and 12 into 'b' and 'h'. Hit 'de'. Make sure to put 20 into 'n'. If I then hit 'D' I should get the diameter on the stack. The 'E' key gets the answer 1.3333. Then press Cc, Fa, or whatever.

But what about the stem-wall. I threw that one in to demonstrate the flexibility of the scripts. I want to know the total surface area of the dome and stem-wall combined. First, press 'Sa' and wait until it pops the surface area (1,347.56) onto the stack. Then hit 'Cc' to pop the circumference (100.53). Type 10 (stem-wall height) and hit 'x' key to multiply it by the circumference, this will calculate the stem-wall area (1005.31). And finally hit '+' to add the two together to return the total surface area of the dome (2,353 square feet). :)

School. When building school buildings we usually know the diameter and height we need, however, it would be better to make these domes ellipsoids so we can gain the most headroom around the base. The problem is that we need to know what the semi-major and semi-minor axes are based on the diameter and height. The key to calculating this is understanding the ellipticity variable.

It takes a lot of practice to get this right, but let's say we want to try a highly elliptical dome, say 1.45 ratio. The dome should be 120' diameter and only 35' high. What ellipsoid will intersect this diameter and height and be a 1.45 ratio between the semi-major and semi-minor axes.

It's simple to do this in the script. Put 120 into 'd', 35 into 'h', and 1.45 into 'e'. Hit 'ab' and viola, the ellipsoid is ready. By pressing 'A' or 'B' I can see the calculated semi-major (60.84') or semi-minor (41.96') axes. The rest works as before.

 


177 Dome Park Place - Italy, TX 76651
Tel (972)483-7423 - Fax (972)483-6662
| Press Room