Hidden WordScanner
Private scans · No account required

DuckieDai Arc Solver

Find the arc length of a circle from its radius and an angle in degrees, a fraction of pi, or radians, or work back to the angle or the radius from an arc length.

trigonometry · MIT License

Overview

Find the arc length of a circle from its radius and an angle in degrees, a fraction of pi, or radians, or work back to the angle or the radius from an arc length.

  • Owner-tested on a TI calculator
  • Version 1.0.0
  • 2160 bytes
  • Uses math

Before you run it

  • TI-84 Plus CE Python · No calculator OS or Python App version has been verified.
  • TI Connect CE .py transfer to the Python App; the owner's transfer details were not recorded
  • The arc and the radius use the same length unit, such as centimeters for both.
  • The angle is the central angle of the arc, the angle at the center of the circle.
  • Numbers may be typed as decimals or fractions such as 1/3; inf and nan are asked for again.

Try the DuckieDai calculator screen

Follow the program's prompts and result flow before downloading.

JavaScript is required for the optional browser simulation. Source viewing and downloading remain available without it.

Simulation boundary: This preview uses a reviewed browser adapter. It does not execute the downloaded Python and does not prove TI-Python or calculator compatibility.

Learn the math

How to find arc length, angle, and radius

The idea

An arc is a piece of a circle's edge. How long it is depends on two things: the size of the circle, given by its radius, and how much of the circle you take, given by the central angle at the middle.

With the angle in radians the link is as simple as it gets: arc length is radius times angle. That is the reason radians exist. An angle in degrees or as a fraction of pi just needs turning into radians first.

The formula

s = r*theta (theta in radians)

theta = s/r

r = s/theta

radians = degrees*pi/180

s
arc length, in the same unit as the radius
r
the radius of the circle
theta
the central angle in radians
pi
about 3.141593; a full turn is 2pi radians, which is 360 degrees

Using the program

Worked example

A circle has radius 3. How long is the arc cut off by a 90 degree angle? Choose 1, then 1 for degrees, and enter 90 and 3.

s = 3 x 90pi/180 = 3pi/2

The program shows EXACT: 3/2pi, then DEC: 4.712389 and ROUND 2: 4.71.

An arc 10 long on a circle of radius 4 spans what angle? Choose 2 and enter 10 and 4. The program shows Angle rad: 2.5.

An arc 10 long comes from a 90 degree angle. What is the radius? Choose 3, enter 10, then 1 for degrees and 90. The program shows Radius: 6.366198, which is 20/pi.

Tips and common mistakes

Where this comes up

Arc length and radian measure come up in geometry and at the start of the trigonometry unit in precalculus, and again in physics for circular motion.

Exact reviewed bytes

Source code

Download .py

View source below, copy it when JavaScript is available, or download the exact .py bytes.

  1. # DUCKIEDAI TM - TRIG LITE
  2. # TI-84 CE PYTHON
  3. from math import pi
  4. def n(p):
  5. while 1:
  6. try:
  7. s=input(p)
  8. if '/' in s:
  9. a,b=s.split('/')
  10. v=float(a)/float(b)
  11. else:v=float(s)
  12. if v-v:raise ValueError
  13. return v
  14. except:
  15. print('Try again')
  16. def f(a,b):
  17. a=int(a);b=int(b)
  18. x=abs(a);y=abs(b)
  19. while y:x,y=y,x%y
  20. if x:a//=x;b//=x
  21. if b==1:return str(a)
  22. return str(a)+'/'+str(b)
  23. def pause():
  24. input("ENTER to continue")
  25. def intro():
  26. print('DUCKIEDAI(TM)')
  27. print('ARC SOLVER')
  28. print(' __')
  29. print(' ___(o )> quack!')
  30. print(' \\ <_. )')
  31. print(" `---'")
  32. print('by DuckieDai')
  33. print('hiddenwordscanner.com')
  34. input('Press Enter ')
  35. print('\n'*7)
  36. def bye():
  37. print('DUCKIEDAI (TM)')
  38. print('hiddenwordscanner.com')
  39. input('ENTER to exit')
  40. def menu():
  41. while 1:
  42. print('\n'*7)
  43. print('DUCKIEDAI ARC')
  44. print('1 Arc 2 Angle 3 Radius')
  45. print('0 Exit')
  46. q=input('Find: ')
  47. if q=='0':break
  48. if q=='1':
  49. print('1 Deg 2 Pi 3 Rad')
  50. z=input('Angle type: ')
  51. if z=='1':
  52. d=n('Degrees: ')
  53. r=n('Radius: ')
  54. t=d*pi/180
  55. if d==int(d) and r==int(r):
  56. print('EXACT:',f(int(d)*int(r),180)+'pi')
  57. elif z=='2':
  58. try:
  59. s=input('Pi fraction: ')
  60. if '/' in s:
  61. x,y=s.split('/')
  62. a=int(x);b=int(y)
  63. else:a=int(s);b=1
  64. if b==0:raise ValueError
  65. r=n('Radius: ')
  66. t=a*pi/b
  67. if r==int(r):
  68. print('EXACT:',f(a*int(r),b)+'pi')
  69. except:
  70. print('Invalid pi input')
  71. pause()
  72. continue
  73. elif z=='3':
  74. t=n('Radians: ')
  75. r=n('Radius: ')
  76. else:
  77. print('Invalid type')
  78. pause()
  79. continue
  80. v=r*t
  81. print('DEC:',round(v,6))
  82. print('ROUND 2:',round(v,2))
  83. elif q=='2':
  84. s=n('Arc length: ')
  85. r=n('Radius: ')
  86. if r==0:print('Invalid radius')
  87. else:print('Angle rad:',round(s/r,6))
  88. elif q=='3':
  89. s=n('Arc length: ')
  90. print('1 Deg 2 pi 3 Rad')
  91. z=input('Angle type: ')
  92. if z=='1':t=n('Degrees: ')*pi/180
  93. elif z=='2':t=n('pi x: ')*pi
  94. elif z=='3':t=n('Radians: ')
  95. else:continue
  96. if t==0:print('Invalid angle')
  97. else:print('Radius:',round(s/t,6))
  98. pause()
  99. intro()
  100. menu()
  101. bye()
Filename
ARCSOLV.py
Size
2160 bytes
SHA-256
21ab891ebf4df2486a1228c89989ff1f657bd02db0b643a856e39a9281b17730

Usage

Inputs

  • What to find: 1 arc length, 2 angle, or 3 radius
  • The angle as degrees, a fraction of pi, or radians
  • The radius or the arc length

Outputs

  • Arc length exactly in terms of pi when the inputs allow, plus the decimal to 6 places and to 2 places
  • The angle in radians, or the radius, to 6 decimal places

Units: The arc and the radius share one length unit; angles in degrees, multiples of pi, or radians.

Assumptions and limitations

Assumptions

  • The arc and the radius use the same length unit, such as centimeters for both.
  • The angle is the central angle of the arc, the angle at the center of the circle.

Constraints

  • Numbers may be typed as decimals or fractions such as 1/3; inf and nan are asked for again.
  • A pi fraction must be whole numbers, such as 3/4 for 3pi/4.
  • The exact answer in terms of pi appears only when the degrees or pi fraction and the radius are whole numbers.

Known failures

  • Angles are not reduced to one turn: 450 degrees gives the arc for one and a quarter turns.
  • A negative angle or radius is not rejected and gives a negative answer.

Compatibility and review

Review status
Owner-tested on a TI calculator
Tested on
Owner reports personally running this program on a TI-84 Plus CE Python calculator; the test date, OS version, and Python App version were not recorded
What happened
Owner reported pass on the calculator before the number prompt was changed to ask again when inf or nan is typed, where the original stopped with an error. Every other step is unchanged; this exact file has not yet been rerun on a calculator.
Dependencies
math
Suggested calculator name
ARCSOLV — you can give it another valid, unique name when you transfer it
Desktop test cases
Not available for this interactive-only source

This exact source auto-launches an interactive calculator session, so compatibility evidence comes from the recorded physical-device review rather than an importable desktop fixture.

Transfer and launch

Download the .py file, send it to your calculator with TI Connect CE as ARCSOLV or another name, then open the Python App and try the worked example on this page first. This release has no verified calculator OS or Python App version; treat transfer and execution as unverified until independently tested.

Full installation and troubleshooting guide. Check your teacher's or exam's rules before using any program.

Version history

Did a DuckieDai program help with your homework? Every program here is free. If you would like to say thanks, you can leave a tip on Cash App ($duckiedai214) or read what tips pay for.

Independent compatibility resource: Hidden Word Scanner is independent and is not affiliated with or endorsed by Texas Instruments. TI product names describe compatibility only.

Action-count privacy: Successful downloads, preview starts, and preview completions increment same-origin aggregate counters, and so does a Yes or No answer about whether the program worked. Your browser notes that you answered; that note is never sent to the site. No entered values, source text, IP address, account, cookie, device identifier, or fingerprint is stored with these counts.