Dome Calculations on Palm HandheldsBy David South JrI 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. InstallationRuss Webb's Nth Lab has an excellent website with instructions to download and install RPN on your Palm Handheld. Nth Lab's
RPN Website: 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. SphereThe 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:
I added a special subset of functions which are useful for calculating second floors and head-clearance.
And finally, I added 'Pi' to output Pi to the stack because I got tired of typing 3.14159265 everytime I needed it. :) OblateI 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:
Or you can alternatively enter the ellipsoid this way:
Make sure to set 'n' usually to 20. The rest of the formulas work like the Sphere Script:
The other items, l, Lr, La, and Pi work exactly the same as the sphere script. Oblate ExamplesHouse. 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. |
||
|
|
||