HP Forums
(71B) Rake Wall: Placement of Studs - Printable Version

+- HP Forums (https://www.hpmuseum.org/forum)
+-- Forum: HP Software Libraries (/forum-10.html)
+--- Forum: General Software Library (/forum-13.html)
+--- Thread: (71B) Rake Wall: Placement of Studs (/thread-7461.html)



(71B) Rake Wall: Placement of Studs - Eddie W. Shore - 12-23-2016 07:12 PM

The program RAKEWALL calculates:

* The positions and lengths of studs on a rake wall
* Angle of the incline

Program RAKEWALL
192 Bytes, 12/22/2016

Code:
10 DESTROY B,R,L,N,A
15 DESTROY I,T,O
50 INPUT “BASE:”; B
52 INPUT “RISE:”; R
54 INPUT “RUN:”; L
56 INPUT “O.C. :”; S
74 N = INT(L/S)
76 DEGREES
78 T = ATAN(R/L)
80 DISP “ANGLE =”; T; “°”  @ PAUSE
90 FOR I=L TO 0 STEP –S
92 A = I*TAN(T)+B
94 DISP I; “, “; A  @ PAUSE
96 NEXT I
98 DISP 0; “, “; B

Notes:
Degree symbol (°): [ g ], [RUN] (CTRL), [ A ]

Example: (amounts are in feet)
BASE: 4
RISE: 3
RUN: 6
O.C.: 16/12 (1 foot, 4 inches)

Output:
ANGLE = 26.5650511771 °
(Position from where the incline meets the base, length of studs)
6, 7
4.66666666667, 6.33333333334
3.33333333334, 5.66666666667
2.00000000001, 5
0.66666666668, 4.33333333334
0, 4