Showing posts with label apothem. Show all posts
Showing posts with label apothem. Show all posts

Saturday, April 20, 2024

Sharp EL-9300 Programs

Sharp EL-9300 Programs


Today’s blog entry takes us to the 1992 Sharp’s EL-9300 graphing calculator. On January 10, 2022, I gave a review of this calculator:

https://edspi31415.blogspot.com/2022/01/retro-review-sharp-el-9300c.html



The programs should also work on the EL-9200. Spaces are added for readability.



Sharp EL-9300 Program: polygon2


The program polygon2 calculates four properties of regular polygons:

* The internal angle of the polygon

* The length of the polygon’s apothem

* The length of the polygon’s radius

* The area of the polygon


A regular polygon is a polygon whose sides all have equal length and all the internal angles are equal.


REAL Mode

Print “Set Degrees 1st”

Wait 1

Print “number of sides”

Input n

Print “side length”

Input x

angle = (n – 2) / n * 180

apothem = x / 2 * tan (angle / 2)

radius = x / (2 * cos (angle / 2) )

area = n * x * apothem / 2

ClrT

Print angle

Print apothem

Print radius

Print area



Note that the calculator must be set in Degrees mode prior to running this program. To set the degrees mode, press [ SET UP ], [ B ], [ 1 ]. Note that this won’t set the angle mode indicator in the program as the angle mode change takes place outside of the program script.


Examples


Inputs: n = 6, x = 8

Outputs:

angle = 120 (internal angle)

apothem = 6.92820323

radius = 8

area = 166.2768775



Inputs: n = 12, x = 1.5

Outputs:

area = 150

apothem = 2.799038106

radius = 2.897777479

area = 25.19134295



Sharp EL-9300 Program: agm


The program agm calculates the arithmetic-geometric mean between two numbers x and y.


(x + y) / 2

√(x * y)


The program also asks for the tolerance. If the tolerance is small, it means we are asking for better accuracy at the expense of additional calculations.


REAL Mode

ClrT

Print “arithmetic/”

Print “geometric mean”

Input x

Input y

Print “tol (10^-nn)”

Input tol

Label loop

a = (x + y) / 2

g = √(x * y)

x = a

y = g

If abs(a – g) >= tol Goto loop

ClrT

Print “results”

Print a

Print g

End


Examples


Inputs: x = 15, y = 70, tol = 10^-6

Outputs:

a = 37.28076573

g = 37.28076573


Inputs: x = 1649, y = 1248, tol = 1E-7

Outputs:

a = 1441.519759

g = 1441.519759


The EL-9300 is pretty quick.



Sharp EL-9300: quadratic


The program quadratic solves the quadratic equation:


a * x^2 + b * x + c = 0


where a, b, and c can be real or complex numbers.


COMPLEX Mode

ClrT

Print “ax^2+bx+c=0”

Print “complex numbers”

Input a

Input b

Input c

x = (-b + √(b^2 – 4 * a * c)) / (2 * a)

z = x - √(b^2 – 4 * a * c) / a

ClrT

Print “solutions=”

Print x

Print z

End


Examples


Inputs:

a = 4 + 3i, b = 2 – 5i, c = 3i

Solutions:

x = 0.346818295 – 0.288439118i

z = -0.066818295 + 1.328439118i


Inputs:

a = 2, b = -6i, c = -4 + 8i

Solutions:

x = 1.370730624 + 0.040924113i

z = -1.370730624 + 2.959075887i



Sharp EL-9300 Program: twobytwo


The program twobytwo solves the simultaneous set of equations:


a * x + b * y = e

c * x + d * y = f


where a, b, c, d, e, and f can be complex numbers.


COMPLEX Mode

Print “2x2 system”

Print “complex numbers”

Print “A=((a,b)(c,d))”

Input a

Input b

Input c

Input d

Print “B=((e)(f))”

Input e

Input f

g = a * d – b * c

h = e * d – f * b

i = a * f – c * e

x = h / g

y = i / g

ClrT

Print “solutions=”

Print x

Print y

End



Examples


Input:

a = 3 + 2i, b = -i

c = 3 – 2i, d = 1 – i

e = 0, f = 5i

Outputs:

x = -0.660377358 + 0.188679245i

y = -0.754716981 + 2.358490566i


Input:

a = 3, b = -6

c = 3i, d = 6i

e = 1, f = -i

Outputs:

x = 0

y = -0.166666667




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, April 6, 2024

Radius and Apothem of Regular Polygons

Radius and Apothem of Regular Polygons


On this blog, let’s calculate the lengths of a regular polygon’s radius, apothem, and area knowing only the side length and internal angle.



A regular polygon is a polygon in which every side has an equal length, and every internal angle is equal.


Let x be the length of one side of the regular polygon, and θ be the internal angle of the polygon where:


θ = (n – 2) / n × 180°




The radius (r) of the regular polygon is a line segment from a vertex to the center of the polygon. The radius bisects the vertex, therefore cutting the internal angle in half.

The apothem (a) is a line segment from the center of the polygon to the center of the polygon’s line segment. If we extend the apothem beyond the border, the apothem splits the length of the side segment in half.

Zooming in, a right triangle is formed between the radius, apothem, and half of the polygon line segment.


By trigonometry:


tan (θ / 2) = a / (x / 2)

a = (x / 2) × tan (θ / 2)


and


cos (θ / 2) = (x / 2) ÷ r

r = x / (2 × cos (θ / 2))


Knowing the apothem, the area of the regular polygon is:


area = perimeter × a / 2


where the perimeter = n × x


Then:


area = (n × x) × a / 2

= 1 / 2 × n × x × a

= 1 / 2 × n × x × (x / 2 × tan(θ / 2))

= 1 / 4 × n × x^2 × tan(θ / 2)



Another Formula for an Area’s Regular Polygons


The area of a regular polygon is often stated as:


area = 1 / 4 × n × x^2 / (tan (180° / n)) = 1 / 4 × n × x^2 × cot (180° / n))


We can show that the two formulas for area are equivalent:


Note that:

θ = (n – 2) / n × 180°

θ = 180° - 360° / n

Divide both sides by 2:

θ / 2 = 90° - 180° / n

180° / n = 90° - θ / 2 [ I ]




Observe that the trigonometric identity, for any angle α:

tan(90° - α) = 1 / tan(α) = cot(α)

and

cot(90° - α) = 1 / cot(α) = tan(α) [ II ]


Then:

area = 1 / 4 × n × x^2 × tan(θ / 2)

= 1 / 4 × n × x^2 × cot(90° - θ / 2) [ II ]

= 1 / 4 × n × x^2 × cot(180° / n) [ I ]

= 1 / 4 × n × x^2 / tan(180° / n) [ I ]


In Summary:

Internal Angle: θ = (n – 2) / 2 × 180°

Apothem: a = (x / 2) × tan (θ / 2)

Radius: r = x / (2 × cos (θ / 2))

Area = 1 / 4 × n × x^2 × tan(θ / 2) = 1 / 4 × n × x^2 / tan(180° / n)

(Note: 180° = π radians)



Table of Apothem and Radius, with side length of 1


n

θ (in degrees)

θ / 2 (in degrees)

a (to 5 decimal places)

r (to 5 decimal places)

3

60

30

0.28868

0.57735

4

90

45

0.5

0.70711

6

120

60

0.86603

1

8

135

67.5

1.20711

1.30656

12

150

75

1.86603

1.93185


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.

Sunday, May 3, 2020

Construction Master 5: Area of Regular Polygons

Construction Master 5: Area of Regular Polygons



Introduction:  Area of a Regular Polygon



The area of a regular polygon is:

Area = 1/2 * P * A

where:
P = perimeter = n * S 
n = number of sides
S = side length
A = apothem length

Divided the regular polygon from drawing lines from the center to each of the polygon's vertices.  Triangles about the center are formed with a central angle, 360° ÷ n. 

The apothem bisects each of the triangles, with the angle nearest to the center of 180° ÷ n.   A right angle is formed between the side and apothem.   The small triangle formed has the base of the s ÷ 2 (since the apothem bisects the side) and A.  The triangle has angles half-central angle (HCA), 90°, and 180° - 90° - HCA.  I will refer to the third angle as the Pitch angle (see the diagram above). 

The trigonometric relationships are:

tan( Pitch ) = A / ( s / 2 )

A = s / 2 * tan(Pitch)

s = 2 * A / tan(Pitch)

It is possible to determine the area of regular polygon knowing the number of sides and either the side length or the apothem.

The Calculated Industries Construction Master 5 does not have trigonometric keys.  However, the Construction Master 5 has four keys that deal with right triangles:

[ Pitch ]:  angle in degrees.  Enter the angle as a unit-less measure.  For example, to enter 60°, press 60 [ Pitch ].  The angle considers the rise of the opposite side, and run the adjacent side.

[ Rise ]:  rise - opposite side.  The Rise is considered the apothem of length A.  You can enter either unit-less or measured amounts (feet/inches/yards/m). 

[ Run ]:  run - adjacent side.  You can enter either unit-less or measured amounts (feet/inches/yards/m).  This represents the side or half-side.

[ Diag ]:  hypotenuse.  The algorithms will not use this key in this blog. 

Known:  Number of Sides and Side Length

The Math:

Area

= 1/2 * P * A
= 1/2 * n * s * (s/2 * tan(Pitch))
= 1/4 * n *  (s * tan(Pitch))

Keystrokes:

180 [ ÷ ] n [ Conv ] (+/-) [ + ] 90 [ Pitch ]
s [ Run ]
[ Rise ] [ × ] [ Rcl ] [ Run ] [ × ] n [ ÷ ] 4 [ = ]

Example:
s = 40 ft, n = 6

180 [ ÷ ] 6 [ Conv ] (+/-) [ + ] 90 [ Pitch ]    (Display:  PTCH 60.00°)
40 [ Feet ] [ Run ]
[ Rise ] [ × ] [ Rcl ] [ Run ] [ × ] 6 [ ÷ ] 4 [ = ]   (Display:  4156.922 SQ FEET)

Area ≈ 4156.922 ft^2

Known:  Number of Sides and Apothem

The Math

Area

= 1/2 * P * A
= 1/2 * (n * s) * A
= 1/2 * n * (2 * A) / tan(Pitch) * A
= n * A  * (A / tan(Pitch))

Keystrokes:

180 [ ÷ ] n [ Conv ] (+/-) [ + ] 90 [ Pitch ]
s [ Rise ]
[ Run ] [ × ] [ Rcl ] [ Rise ] [ × ] n [ = ]

Example:
A = 40 ft, n = 6

180 [ ÷ ] 6 [ Conv ] (+/-) [ + ] 90 [ Pitch ]   (Display:  PTCH 60.00°)
40 [ Feet ] [ Rise ]
[ Run ] [ × ] [ Rcl ] [ Rise ] [ × ] 6 [ = ]   (Display:  5542.563 SQ FEET)

Area ≈ 5542.563 ft^2

And that is how to find the area of a regular polygon using the Construction Master 5.

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.

RPN HP 12C: Fibonacci and Lucas Sequences

  RPN HP 12C: Fibonacci and Lucas Sequences Golden Ratio, Formulas, and Sequences Let φ be the Golden Ratio: φ = (1 + √5) ÷ 2...