N sided polygon with side length L inscribed in circle diameter D - J E Patterson - jepspectro.com

J E Patterson - jepspectro.com - 20231119

Description

This program returns the length L of one side of an N sided polygon inscribed in a circle of diameter D. The number of polygon sides is stored in register 1. The circle radius is stored in register 2.

Enter Circle diameter D
Press ENTER
Enter Polygon number of sides N
GSB A
Returns the length L of one side of the polygon


Example 1:
Circle diameter 1 metre
Triangle inscribed 3 sides
1
ENTER
3
Result: 0.866025404 = radius * √3 = 0.5*√3


Example 2:
Circle diameter 1 metre
Square inscribed 4 sides
1
ENTER
4
Result: 0.707106781 = radius * √2 = 0.5*√2

Program Resources

Labels

Name Description
 A Returns the length L of one side of the polygon

Storage Registers

Name Description
 1 Polygon number of sides N
 2 Circle radius R

Program

Line Display Key Sequence
000
001 42,21,11 f LBL A
002 44 1 STO 1
003 33 R⬇
004 2 2
005 10 ÷
006 44 2 STO 2
007 2 2
008 36 ENTER
009 3 3
010 6 6
011 0 0
012 36 ENTER
013 45 1 RCL 1
014 10 ÷
015 24 COS
016 2 2
017 20 ×
018 30
019 11 √x̅
020 45 2 RCL 2
021 20 ×
022 43 32 g RTN