A POLAR COORDINATE ADDER(TI-92)
This program add two vectors in polar coordinates.
- :pcadd()
- :Prgm
- :setMode("Angle", "DEGREE")
- :Input "r1", a
- :Input "a1", b
- :Input "r2", c
- :Input "a2", d
- :a*cos(b)+c*cos(d)=>x
- :a*sin(b)+c*sin(d)=>y
- :(x^2+y^2)^.5=>r
- :tan^-1(y/x)=>a
- :Disp "The Sum Is"
- :Disp "Magnitude=", r
- :Disp "Angle=", a
- :EndPrgm
Discussion:
Add (1,0°) + (1,90°)
Add (1,90°) + (1,180°)
In gerenal, where does the program fail?
After the inverse tangent statement, insert:
- :If x<0
- :Then
- :a+180=>a
- :EndIf
What is happening in the statement ":a+180=>a"?
Will we even need the "old a" again?
Does the program still work in all cases? Where does it fail?
Assignments:
Select appropriate problems from the plethora of problems of airplanes in flight and campers walking north, south, east, and west.
Finish the program so that it works in all cases.