Section Properties Program for the HP-48
1995 Ted Cashin (internet: dtbrejc@vax.dot.state.ga.us)

PROP takes dimensions of a shape and calculates Area, Moment of Inertia and the centroid relative to the top (or bottom) of the section.  The user must enter information by dividing the shape into layers.  You can have as many layers as you want.  After the last layer, use the LAST instead of CONT menu key to get the output.

How it works:

The program assumes each layer is a trapezoid with one base as Xo and the other as the current value of x, with a height of y.  It breaks this trapezoid down into a rectangle Xo by y and a traiangle of (x-Xo) by y.  It doesnt matter if the triangle has a negative area, it will work out anyway.  It  then calculates the moment of inertia of the two shapes about the origin and adds it to the previous sum of I.  It also calculates a new area and using a weighted average, the new centroid of the whole shape.  It then sets Xo to the current x and asks for more input.  If the layer was the last layer it jumps out of the loop and converts the moment of inertia about the origin to a moment of inertia about the centroid of the shape.  It gives values of Icg, A, and yc (distance from origin to centroid).  Also stored are overall height (yt) and the moment of inertia about the origin (It).  Global variables Xo, x, y, Asq, and Atr are created and purged within the program because I couldnt get local variables to do the job.  If the program does not finish normally, these variables will not be purged.