Tampilkan postingan dengan label geometry. Tampilkan semua postingan
Tampilkan postingan dengan label geometry. Tampilkan semua postingan

TI-58/TI-59 Week: Law of Cosines

TI-58/TI-59 Week:  Law of Cosines


Introduction


[ A ]:  stores either the angle θ or a 

[ B ]:  stores the length of side b

[ C ]:  stores the length of side c


[ D ]:  calculates the length of side a:

a^2 = b^2 + c^2 - 2 * b * c * cos θ


[ E ]:  calculates the angle θ

cos θ = (b^2 + c^2 - a^2) / (2 * b * c)


The angle θ is opposite slot of side a.


Program Listing


000 76 LBL

001 11 A

002 42 STO 

003 01 01

004 92 INV SBR (RTN)


005 76 LBL

006 12 B

007 42 STO

008 02 02

009 92 INV SBR


010 76 LBL

011 13 C

012 42 STO

013 03 03

014 92 INV SBR


015 76 LBL

016 14 D

017 43 RCL

018 02 02

019 33 x^2

020 85 +

021 43 RCL

022 03 03

023 33 x^2

024 75 -

025 02 2

026 65 ×

027 43 RCL

028 02 02

029 65 ×

030 43 RCL

031 03 03

032 65 ×

033 43 RCL

034 01 01

035 39 cos

036 95 =

037 34 √

038 42 STO 

039 04 04

040 INV SBR


041 76 LBL

042 15 E

043 53 (

044 43 RCL

045 02 02

046 33 x^2

047 85 +

048 43 RCL

049 03 03

050 33 x^2

051 75 -

052 43 RCL 

053 01 01

054 33 x^2

055 54 )

056 55 ÷

057 53 (

058 02 2

059 65 ×

060 43 RCL

061 02 02

062 65 ×

063 43 RCL

064 03 03

065 54 )

066 95 =

067 02 INV

068 39 cos  (arccos)

069 42 STO 

070 04 04

071 92 INV SBR


Examples


Calculating a:


Set the TI-58/TI-59 to Degrees mode:


Input:


50° [ A ]

45  [ B ]  (b)

35 [ C ] (c)

[ D ] returns a:  35.00312885


85° [ A ]

100  [ B ]  (b)

70 [ C ] (c)

[ D ] returns a:  116.9607609


Calculating θ:


52 [ A ]  (a)

38 [ B ] (b)

49 [ C ] (c)

[ E ] returns θ:  72.15813198


80 [ A ]  (a)

60 [ B ] (b)

65 [ C ] (c)

[ E ] returns θ:  79.47338145


Note:  The next post will be on July 23, 2022.


Eddie


All original content copyright, © 2011-2022.  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. 


TI-84 Plus CE Python: Polygon Path (ppath.py)

TI-84 Plus CE Python:  Polygon Path (ppath.py)


Introduction


The program PPATH:


Between two points:  


1.  Calculates the required leftward, counter-clockwise angle.


2.  Calculates the distance to be traveled. 


The path starts at the origin (0,0).  You can create open paths or closed polygons.  For polygons, add another point and include (0,0) as the last point.  


TI-84 Plus CE Python Program:  PPATH - Python (ppath)


Download the TI-84 Plus CE Python file here:  https://drive.google.com/file/d/1QnPP9ikx45i7gAH22fTkFAmE-pBFQwTD/view?usp=sharing


Copy the code for a text file.  


print("Poly Path \nEdward Shore")

# 2022-04-27

from math import *

from turtle import *

t=Turtle()

# t is required for turtle

from ti_system import *


# hide the grid

t.hidegrid()


# obtain the points

x=[0]

y=[0]

# angles

g=[0]

# degree difference

q=[0]

# distance

d=[0]


print("Point 0: (0,0)")

print("#_0 to #_n-1")

n=eval(input("# points? "))


for i in range(1,n):  

  a=eval(input("x"+str(i)+"? "))

  b=eval(input("y"+str(i)+"? "))

  x.append(a)

  y.append(b)

  r=sqrt((a-x[i-1])**2+(b-y[i-1])**2)

  d.append(r)

  m=degrees(atan2(b-y[i-1],a-x[i-1]))

  v=m-g[i-1]

  if v<0:

    v+=360

  g.append(m)

  q.append(v)

  r6=round(r,6)

  m6=round(v,6)

  print("Distance: "+str(r6))

  print("Left Turn: "+str(m6)+"\u00b0")


print("\nPress [clear] to continue.")

disp_wait()


t.home()

t.pencolor(0,128,0)

# set speed

t.speed(4)

for i in range:

  t.left(q[i])

  t.forward(d[i])

t.done()


Notes:


1.  Turtle is a add-in module for the TI-84 Plus CE Python, which must be downloaded. Download the Turtle module here:  https://education.ti.com/en/product-resources/turtle-module/ti84ce-python


2.  Calling the Turtle module automatically assigns the variable t to a drawing turtle by the line t=Turtle().


3.  The ti_system module is exclusive to the TI-84 Plus CE.  This allows the program to pause with the disp_wait command.  


4.  The underscore character ( _ ) can be typed by the [ 2nd ] [ (-) ] (ans) sequence.  


5.  The hashtag character ( # ) can be typed by the [ 2nd ] [ 3 ] (L3) sequence.  


6.  The line for i in range(1,n) starts a for loop with i taking the values from 1 to n-1. This is good for lists when the initial point (point 0) does not need further processing. 


7.  The default operating angle measurement in Python is Radians.  


8.  The angle difference, which tells us how many degrees to turn left, is normalized to the 0°-360° range.   This is optional.   


9.  The line t.home() sets the turtle to point (0,0) and sets the turtle's orientation to 0° (facing right, forward on the x-axis).


10.  The line t.done() shows the results of the turtle commands. 


Examples


Example 1: Quadrilateral




Example 2:  An Open Path




Enjoy!  


Eddie 



All original content copyright, © 2011-2022.  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. 


Converting a Line in Parametric Line to a Function Line

Converting a Line in Parametric Line to a Function Line 


From (x(t), y(t)) to y(x)


Express a line, presented in parametric form:


x = A * t + B

y = C * t + D


where A, B, C, and D are constants, and convert it to function form (y(x) or f(x)).


Here is one way to do this:


x = A * t + B

A * t = x - B

t = x / A - B / A


y = C * (x / A - B / A) + D

y = (C/A) * x - B*C/A + D

y = (C/A) * x + (D - B*C/A)


We know have a function in the slope-intercept form where:


slope = C/A


intercept = D - B*C/A


Casio fx-4000P Program:  Converting Parametric Lines to Functional Line

Size:  77 bytes

(line breaks added for readability)


"X=AT+B; A":

?→A:

"B":

?→B:

"Y=CT+D; C":

?→C:

"D":

?→D:

"SLOPE="⊿

C÷A→M⊿

"ITC="⊿

D-B×M→I


Examples


Graph screens are created by the Numworks emulator:  https://www.numworks.com/simulator/


Example 1:

x = 3 * t  - 4 

y = 2 * t + 8


A = 3, B = -4, C = 2, D = 8


Results:

SLOPE = 0.666666667

ITC = 10.66666667






Example 2:

x = -2 * t + 6

y = 4 * t + 3


A = -2, B = 6, C = 4, D = 3


Results:

SLOPE = -2

ITC = 15





Hope you find this useful.  Take care,


Eddie 


All original content copyright, © 2011-2022.  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. 


Backlink 9999 Traffic Super

Order Now...!!!!