Angle of Intersection

We're glad you came by, but you might find what you're looking for elsewhere.

TI-Basic Developer is not the site it once was. While its information on commands and other calculator features remains almost second-to-none, its forum, archives, and even hosting service, Wikidot, have been decaying for years. The calculator community would love to see what you're working on, or help you in your next coding adventure, but TI-Basic Developer is no longer the place to do it.

Instead, you should head over to Cemetech (primarily American) or TI-Planet (primarily international). Both are active, well-established forums with their own archives, chatrooms, reference material, and abundant coding tools and resources. We'll see you there, we hope.

This code finds the angle of intersection of two lines.

Routine Summary

Finds the angle of intersection for any two lines.

Inputs

Str1 and Str2

Outputs

Ans

Variables Used

Y1, Y2, I, Ans, X

Calculator Compatibility

TI-83/84/+/SE/CSE/CE

Authors

kg583, Myles_Zadok

:Degree
:Str1→Y1
:Str2→Y2    \\If your equations are already stored in Y1 and Y2, these two lines are unneccessary
:E‾9→I      \\This threshold can be changed to adjust the output accuracy
:angle(I+i(Y2(X+I)-Y2(X
:Ans-angle(I+i(Y1(X+I)-Y1(X
:Disp "ANGLE OF INTERSECTION IS",Ans

The routine works by assuming the graphs are almost straight lines at a very small scale around the point of intersection given by X. The two graphs are approximated by complex numbers made by combining the x and y coordinates. The angle( command finds the angle for each complex number, then they are subtracted. This command is useful as it avoids domain errors caused by using tanֿ¹(.

If you do not already know the x-coordinate of the intersection of the two graphs, you can add this line at the beginning to find it:

:solve(Y2(X)-Y1(X)=0,X,0→X

.

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-Noncommercial 2.5 License.