Showing posts with label right triangles. Show all posts
Showing posts with label right triangles. Show all posts

Saturday, March 23, 2024

Measuring a Distance with an Object in the Way

 Measuring a Distance with an Object in the Way




A Surveying Problem





Refer to the picture above. Here’s the situation: We are given a line and we are to determine a distance, X, from the Observer to the Survey Point. There is one problem though, there is a tree in the way, and the distance we are to measure goes directly through the tree.


Perhaps we can estimate the distance. Pick a point where the line of sight is not blocked. Let this new point be the Auxiliary Point and let C be the distance between the Observer and the Auxiliary Point.


We can also measure the distance between the Auxiliary Point and Survey Point, name this distance H. We can use the “right triangle” created to find the original distance X.



By the Pythagorean Theorem, we have:


X^2 + H^2 = C^2

X^2 = C^2 – H^2

X = √(C^2 – H^2) (only positive roots make geometric sense)


What if the calculator device does not have the square root function? Or if you are working by hand? In the 1938 book, The Principles and Practice of Surveying, Volume I (see the Source section), we can estimate the length of X without the need of taking a square root. Here is the derivation:


X^2 + H^2 = C^2

H^2 = C^2 – X^2

Observe that for any t, s: t^2 – s^2 = (t – s) × (t + s), and:


H^2 = (C – X) × (C + X)


If H is small, then C is close to X. Assume that H is small. As a result, C ≈ X. This derivation applies this approximation only to the term C + X:


H^2 ≈ (C – X) × (C + C)


Solve for X:


H^2 ≈ (C – X) × 2 × C

H^2 ÷ (2 × C) ≈ C – X

X ≈ C - H^2 ÷ (2 × C)


How good is the estimated formula?




Testing the Approximation


I used the HP 15C Collector’s Edition for testing the approximation formula. The code used to compare the approximate to the actual result:


Line #; Key Code; Key


Stack: y: hypotenuse (C), x: side length (H); (y > x)


01; 42, 21, 11; LBL A // approximate calculation

02; __, 44, _1; STO 1

03; __, __, 34; x<>y

04; __, 44, _2; STO 2

05; __, 45, _2; RCL 2

06; __, 45, _1; RCL 1

07; __, 43, 11; x^2

08; __, __, _2; 2

09; __, __, 10; ÷

10; __, 45, _2; RCL 2

11; __, __, 10; ÷

12; __, __, 30; -

13; __, 44, _3; STO 3

14; __, __, 31; R/S

15; __, 45, _2; RCL 2 // actual calculation

16; __, 43, 11; x^2

17; __, 45, _1; RCL 1

18; __, 43, 11; x^2

19; __, __, 30; -

20; __, __, 11; √

21; __, 44, _4; STO 4

22; __, __, 31; R/S

23; __, 45, _3; RCL 3 // absolute error

24; __, 45, _4; RCL 4

25; __, __, 30; -

26; __, 43, 16; ABS

27; __, 43, 32; RTN


(27 steps, 34 bytes)


Sample Data (rounded to 7 digits)


C

H

Approx.

Actual

Abs. Error

5

1

4.9

4.8989795

0.0010205

6

1

5.9166667

5.9160798

0.0005869

7

1

6.2985174

6.9282032

0.0003682

8

1

7.9375

7.9372539

0.0002461

9

1

8.9444444

8.9442719

0.0001725

10

1

9.95

9.9498744

0.0001256

5

2

4.6

4.5825757

0.0174243

6

2

5.6666667

5.6556842

0.0098124

7

2

6.7142857

6.7082039

0.0060818

8

2

7.75

7.7459667

0.0040333

9

2

8.7777778

8.7749644

0.0028134

10

2

9.8

9.7979590

0.0020410

5

3

4.1

4

0.1

6

3

5.25

5.1961524

0.0538476

7

3

6.3571429

6.3245553

0.0325875

8

3

7.4375

7.4161985

0.0213015

9

3

8.5

8.4852814

0.0147186

10

3

9.55

9.5393920

0.0106080

20

19

10.975

6.2449980

4.7300020

20

1

19.975

19.9749844

0.0000156

50

49

25.99

9.9498744

16.0401256

50

1

49.99

49.9899990

0.0000010




From the data above, it seems that the greater the difference between C and H, in general, the better the approximation.



Source


Breed, Charles B. and George L. Hosmer. The Principles and Practice of Surveying: Volume I. Elementary Surveying. 7th Edition. John Wiley & sons, Inc. London, Chapman & Hall, Limited. 1938. pg. 14


Eddie


All original content copyright, © 2011-2024. Edward Shore. Unauthorized use and/or unauthorized distribution for commercial purposes without express and written permission from the author is strictly prohibited. This blog entry may be distributed for noncommercial purposes, provided that full credit is given to the author.

Saturday, June 17, 2023

Areas of Right Triangle Knowing the Hypotenuse and the Angle

Areas of Right Triangle Knowing the Hypotenuse and the Angle



General Right Triangle


Let:


D = the length of a hypotenuse

A = the length of side A opposite of angle α°

B = the length of side B opposite of angle β°


Let's assume that we only know of hypotenuse D and angle α°.  Find the area:


Area = 1/2 × A × B


Determined by trigonometric ratios: 

 A = H × sin α° and B = H × cos α°


Then:


Area = 1/2 × A × B

Area = 1/2 × H × sin α° × H × cos α°

Area = 1/2 × H^2 × sin α° × cos α°


Let's assume that we only know the angle β° instead:


Area = 1/2 × H^2 × sin α° × cos α°


Since α° + β° = 90°,


Area = 1/2 × H^2 × sin (90° - β°) × cos (90° - β°)


With the trigonometric identities:

sin(90° - θ°) = cos θ°, and cos(90° - θ°) = sin θ°


Area = 1/2 × H^2 × cos β° × sin β°


In a remarkable conclusion:


Area = 1/2 × H^2 × sin α° × cos α° = 1/2 × H^2 × cos β° × sin β°


Let's look at specific right triangles.




Area of 30°-60°-90° Triangles





Assume that α = 60° and β = 30°.  Then:


Area = 1/2 × H^2 × sin 60° × cos 60° 

Area = 1/2 × H^2 × √3/2 × 1/2

Area = (H^2 × √3) / 8


Similarly,


Area = 1/2 × H^2 × sin 30° × cos 30° 

Area = 1/2 × H^2 × 1/2 × √3/2

Area = (H^2 × √3) / 8



Area of 45°-45°-90° Triangles





On a 45-45-90 triangle, the measures A and B are equal.  Then:


Area = 1/2 × H^2 × sin 45° × cos 45° 

Area = 1/2 × H^2 × √2 / 2 × √2 / 2 

Area = H^2 / 4



Area of 75°-15°-90° Triangles





Assume that α = 75° and β = 15°.  Then:


Area = 1/2 × H^2 × sin 75° × cos 75° 

Area = 1/2 × H^2 × (√6 + √2)/4 × (√6 - √2)/4

Area = 1/32 × H^2 × (√6 + √2) × (√6 - √2)

Area = 1/32 × H^2 × (6 - √6 × √2 + √6 × √2 - 2)

Area = 1/32 × H^2 × 4

Area = H^2 / 8


Similarly,


Area = 1/2 × H^2 × sin 15° × cos 15° 

Area = 1/2 × H^2 × (√6 - √2)/4 × (√6 + √2)/4

Area = 1/32 × H^2 × (6 + √6 × √2 - √6 × √2 - 2)

Area = 1/32 × H^2 × 4

Area = H^2 / 8



Summary


Area of a Right Triangles knowing only the Hypotenuse and One (does not matter which one as it turns out) Angle:


Area = 1/2 × H^2 × sin θ × cos θ


Area of 30°-60°-90° Triangles: (H^2 × √3) / 8


Area of 45°-45°-90° Triangles: H^2 / 4


Area of 75°-15°-90° Triangles: H^2 / 8



Eddie 


All original content copyright, © 2011-2023.  Edward Shore.   Unauthorized use and/or unauthorized distribution for commercial purposes without express and written permission from the author is strictly prohibited.  This blog entry may be distributed for noncommercial purposes, provided that full credit is given to the author. 


Friday, April 24, 2020

Construction Master 5: Right Triangles

Construction Master 5:   Right Triangles

Introduction



The Calculated Industries Construction Master 5 does not have trigonometric keys, but it has four keys to dedicated to solving problems with right triangles, which appear a lot in construction.  Those four keys are:

[ Pitch ]:  there are several ways to enter the pitch:

If the amount is in inches, then the measurement is put as a pitch (x inches per 12 inches).  Example:  3 [ Inch ] [ Pitch]  inputs the angle as a 3 inch pitch (approximately 14.04°)

If the amount is in percent, the angle is entered as a percent grade.   Example: To enter 2% grade, press 2 [ % ] [ Pitch ] (approximately 1.15°)

If the amount is not attached to a unit, the amount is entered as degrees.  Example: To enter 30°, press 30 [ Pitch ].

[ Rise ]:  rise - opposite side.  Amounts can be entered with or without units.   

[ Run ]:  run - adjacent side.  Amounts can be entered with or without units.

[ Diag ]:  diagonal - hypotenuse.  Amounts can be entered with or without units.  Solving for the diagonal is known as a squaring-up calculation. 

To solve for a variable, just press the key without entering an amount. 

After all the variables have been calculated, you can calculate perimeter and area by:

Perimeter:  [ Rcl ] [ Rise ] [ + ] [ Rcl ] [ Run ] [ + ] [ Rcl ] [ Diag ]

Area:  [ Rcl ] [ Rise ] [ × ] [ Rcl ] [ Run ] [ ÷ ] 2

Examples 

Example 1:

Given:  Diagonal:  17.4 feet, Pitch:  20°

Results:
Rise:  5.95115 feet;  Run:  16.35065
Perimeter:  39.7018 feet;  Area:  48.65259 square feet

Example 2:

Given: Rise:  50 feet, Run:  40 feet

Results:
Diagonal:  64 feet 3/8 inch;  Pitch:  51.34°
Perimeter:  154 feet 3/8 inch feet;  Area:  1000 square feet

Example 3:

Given:  Grade: 3%, Feet: 17.5 Feet

Note, to enter the grade:  3 [ % ] [ Pitch ]

Results:
Run:  583.3333 ft, Diag:  583.5958 ft
Angle:  1.72°
Perimeter:  1184.429; Area: 5104.167 square feet

Eddie

All original content copyright, © 2011-2020.  Edward Shore.   Unauthorized use and/or unauthorized distribution for commercial purposes without express and written permission from the author is strictly prohibited.  This blog entry may be distributed for noncommercial purposes, provided that full credit is given to the author.

Saturday, February 1, 2020

Review: Calculated Industries Tradesman Calc

Review: Calculated Industries Tradesman Calc




Quick Facts:

Model:  Tradesman Calc, Model Number 4400
Company:  Calculated Industries
Type:  Scientific, Construction
Years:  Introduced 2012
Display:  8 digits
Batteries:  Battery, 1 CR2016
Retail Price:  $44.99, you can pay lower on internet searches.  I paid $29.95 from WalMart.
Memory Registers: 10, Registers 1 through 9, M 

Features

*  Units and unit conversions
*  Right Triangle Calculations
*  Ratio Calculations
*  Trigonometry
*  Geometry Calculations

Other mathematical functions:  reciprocal, powers, roots, degrees/degrees-minutes-seconds, parenthesis

The calculator operates in one of two modes:  Order and Chain

Order uses order of operations while chain completes calculations as keys are pressed (like a four-function calculator).  Order of operations is the default setting. 

Fraction settings allow you to set the largest denominator, up to 64. 

Unit and Unit Conversions

In keeping with the other construction calculators, the Tradesman Calc offers units and unit conversions.  Notice that the shift key is labeled Conv for this purpose.  You can easily add, subtract, multiply, and divide measurements.  For example to add 4 feet 5 inches with 6 feet 7 1/2 inches, press:

4 [ Feet ] 5 [ Inch ]   (Display:  4 - 5   FEET INCH)
[ + ] 6 [ Feet ] 7 [ Inch ] 1 [ / ] 2
[ = ]

Display:  11 - 0 1/2  FEET INCH  (11 feet, 1/2 inch)

You can convert the answer to decimal feet like this:

[ Conv ] [ Feet ]

Display:  11.041667  FEET

To convert to Inches: 

[ Conv ] [ Inch ]

Display:  132.5  INCH

To meters:

[ Conv ] [ m ]

Display:  3.3655 M

Units also include temperature (°F, °C), weight and mass (lbs, dry oz, tns, kg, grams, metric tons, wt/vol), and length (yds, feet, inch, m, cm, mm Bd Ft). 

Right Triangle Calculations 

The [ Adj ] (adjacent side), [ Opp ] (opposite side), [ Hyp ] (hypotenuse), and [Angle] (angle and adjacent angle) keys are used to solve right triangle problems.  Any two of the variables can be known to solve for everything else.  For example:

Known:  Adjacent (run):  15 feet,  Opposite (rise):  13 feet 8 inches

[Conv] [ × ] (Clear All)  (as recommended by Calculated Industries)
15 [ Feet ] [ Adj ]
13 [ Feet ] 8 [ Inch ] [ Opp ]

[Hyp] 20.292308 feet
[Angle] 42.336999°
[Angle] 47.663001° (adjacent angle)

Ratio Calculations

Use the X, Y, and X:Y commands to store and calculate ratios.  Example:

For the ratio 5/8 find X when X/18.

5 [Conv] [ Adj ] (X)   (stores 5 in X)
8 [Conv] [ Opp ] (Y)   (stores 8 in Y)
[Conv] [ Hyp ] (X:Y)   Result:  1 = 1.6

18 [Conv] [ Opp ] (Y)  (stores 18 in Y)
[Conv] [ Adj ] (X)    Result:  X = 11.25

Trigonometry

The Tradesman Calc has the trigonometric functions sine, cosine, and tangent, with inverse.  All angles are measured in degrees.

Geometry

Geometric calculations includes circles, arcs, and regular polygons (including inside and outside diameter). 

Keyboard

The keyboard is a pleasure to use.  Aside it being blue (blue is my favorite color), the keys have a pleasant touch and register perfectly.  The display is clear with prompts.  The Tradesman Calc comes with a hard case cover.  On the back of the calculator, there is a slot for a battery and another for user guide. 

Verdict

For a trade industries, I recommend this calculator.  The calculator has a convenient solvers for common geometry shapes along with unit mathematics. If you are going to purchase the Tradesman Calc, I recommend so shopping for less than retail price. 

Eddie

All original content copyright, © 2011-2020.  Edward Shore.   Unauthorized use and/or unauthorized distribution for commercial purposes without express and written permission from the author is strictly prohibited.  This blog entry may be distributed for noncommercial purposes, provided that full credit is given to the author.

Friday, December 23, 2016

Fun with HP 71B IV

Fun with HP 71B IV

For the previous entries:

Links to other HP 71B Programs:
Fun with the 71B:
http://edspi31415.blogspot.com/2012/06/fun-with-hp-71b.html
Fun with the 71B III:


Rake Wall

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

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


Automotive Cylinders:  Calculating Displacement and Piston Speed

The program supplies default values which can be accepted or changed.



Program AUTOCYN
217 Bytes, 12/22/2016

10 DESTROY N,B,S,R,E,P
15 INPUT “# CYLINDERS:”,  “6”; N
20 INPUT “BORE (IN):”, “4”; B
25 INPUT “STROKE (IN):”, “4”; S
30 E = PI/4 * B^2 * S * N
35 INPUT “RPM:”; R
40 P = S * R / 6
45 DISP “ENGINE DISPLACEMENT =” @ WAIT 1
50 DISP E; “ IN^3” @ PAUSE
55 DISP “PISTON SPEED =” @ WAIT 1
60 DIPS P; “FPM”

Example 1:
N = 6 cylinders, B = 4 in, S = 4 in, RPM = 3500
Output:  E ≈ 301.59290 in^3, P ≈ 2333.33333 FPM

Example 2:
N = 6 cylinders, B = 4 in, S = 3 in, RPM = 4500
Output:  E ≈ 226.19467 in^3, P = 2250 FPM

Right Triangle Solver

The program RIGHTTRI is a solver for the sides A, B, and C.  To solve for the third side, the desired side needs to have a 0 value, while the other two sides have non-zero values.  Each time a solution is found, the values of A, B, and C are reset (set to 0).



Program RIGHTTRI
502 Bytes, 12/22/2016

10 DESTROY A,B,C,Z$
11 ! LOOP
12 DISP “A, B, C, Solve, Exit”
14 DELAY 0, 0
16 Z$ = KEY$
18 IF Z$ = “A” THEN 30
20 IF Z$ = “B” THEN 40
22 IF Z$ = “C” THEN 50
24 IF Z$ = “S” THEN 60
26 IF Z$ = “E” THEN 96
28 GOTO 12
30 INPUT “A = “; A
32 GOTO 12
40 INPUT “B = “; B
42 GOTO 12
50 INPUT “C = “; C
52 GOTO 12
60 IF A=0 AND B AND C THEN 62 ELSE 70
62 S=SQR(C^2-B^2) @ Z$ = “A”
64 GOTO 90
70 IF A AND B=0 AND C THEN 72 ELSE 80
72 S=SQR(C^2-A^2) @ Z$ = “B”
74 GOTO 90
80 IF A AND B AND C=0 THEN 82 ELSE 86
82 S=SQR(A^2+B^2) @ Z$ = “C”
84 GOTO 90
86 DISP “MUST HAVE ONE 0” @ BEEP @ WAIT .5
88 GOTO 10
90 DISP Z$; “ = “; S @ PAUSE
92 GOTO 10
94 DISP “DONE”

Notes:

The line of IF A=0 AND B AND C… tests whether A is zero, B and C are non-zero.  You can test whether a variable is non-zero by just typing the variable in an IF condition.

The function SQR is the square root function of the HP 71B.

Anything following an exclamation point (!) is a comment.


Basic Bridged-T Notch Filter

The program NOTCH calculates the required capacitor and resistor to null out an undesired frequency.

Inputs:  inductance (H), frequency to nullified (Hz), resistance of the required coil (Ω)



Source:  Rosenstein, Morton.  Computing With the Scientific Calculator Casio: Tokyo, Japan.  1986.  ISBN-10: 1124161430

Program NOTCH
244 Bytes, 12/22/2016

10 DESTROY L,F,I,C,R
20 DISP “INDUCTANCE” @ WAIT 1
22 INPUT “in H: “; L
24 DISP “FREQUENCY” @ WAIT 1
26 INPUT “in Hz: “; F
28 DISP “COIL’S RESISTENCE” @ WAIT 1
30 INPUT “in Ω: “; I
40 C = 1/(2 * PI^2 * F^2 * L)
42 R = (PI * F * L)^2 / I
44 DISP “NOTCH CAPACITOR” @ WAIT 1
46 DISP C; “ F” @ PAUSE
48 DISP “NOTCH RESISTENCE” @ WAIT 1
50 DISP R; “ Ω”

Notes:
Capital Omega Character (Ω):  [ g ], [RUN] (CTRL), [ Q ]

Example:   L = 0.12 H, F = 1170 Hz, Coil Resistance = 30 Ω
Output: 
NOTCH CAPACITOR ≈ 3.08402 * 10^-7 F
NOTCH RESISTENCE ≈ 6485.04070 Ω


Differential Equations and Half-Increment Solution, Numerical Methods

The program HALFDIFF solves the numerical differential equation

d^2y/dt^2 = f(dy/dt, y, t)  given the initial conditions y(t0) = y0 and dy/dt (t0) = dy0

In this notation, y is the independent variable and t is the dependent variable.

The Method

Let C = f(dy/dt, y, t).  Give the change of t as Δt.

First Step:

With t = t0:
h_1/2 = dy0 + C * Δt/2
y1 = y0 + dy0 * Δt

Loop:

t = t0 + Δt
h_I+1/2 = h_I-1/2 + C * Δt
y_I+1 = y_I +h_I+1/2 * Δt

Repeat as many steps as desired.


Source:  Eiseberg, Robert M.  Applied Mathematical Physics with Programmable Pocket Calculators  McGraw-Hill, Inc:  New York.  1976.  ISBN 0-07-019109-3

Program HALFDIFF
250+ bytes, 12/22/2016

Edit f(A,Y,T) at line 5 where
A = y’(t), Y = y(t),  T = t

5 DEF FNF(A,Y,T) = insert function y’(t), y(t), and t here
10 DESTROY A,Y,D,N,H,T
12 RADIANS
20 INPUT “dY/dX (0) = “, “0”; A
22 INPUT “Y(0) = “, “0”; Y
24 INPUT “DELTA T = “,”1”; D
26 INPUT “TMAX = “,”5”; N
28 T = D
44 H = A + FNF(A,Y,T) * D/2
48 Y = Y + H * D
50 DISP D; “, “;  Y @ PAUSE
70 FOR I = 2 * D TO N STEP D
72 T = I @ A = H
76 H = H + FNF(A,Y,T) * D
78 Y = Y + H * D
80 DISP I; “, “; Y @ PAUSE
82 NEXT I

Example:  y’’(t) = y’(t) + 2 *  t with y’(0) = 0, y(0) = 1, Delta t = 1, Max t = 6
FNF(A,Y,T) = A + 2 * T

Results:

T
Y
1
2
2
8
3
26
4
70
5
168
6
376


  
This blog is property of Edward Shore, 2016.





Numworks (Python): Parallelograms Described by Vectors

Numworks (Python): Parallelograms Described by Vectors Introduction The script drawpgram.py draws a parallelogram constructed by ...