Sunday, April 9, 2023

Casio fx-9750GIII: Drawing the Unit Circle with an Angle

Casio fx-9750GIII:  Drawing the Unit Circle with an Angle


Introduction


The program TRIGCIRC draws a unit circle on the left side of the screen with any angle entered.  This program is an approximate simulation to the trigonometric circle application that is set to appear on future Casio non-graphing calculators in Europe, such as Belgium version of the fx-92.  Link:  https://tiplanet.org/forum/viewtopic.php?p=271049#p271049  


The program uses the full unit circle only.  



Casio fx-9750GIII Program: TRIGCIRC

(316 bytes)


Code:


Lbl 5

ClrText

Menu "ANGLE","DEG",1,"RAD",2,"GRAD",3

Lbl 1:Deg:Goto 4

Lbl 2:Rad:Goto 4

Lbl 3:Gra:Goto 4

Lbl 4

ClrGraph

ViewWindow -1.5,5,1,-1.5,1.5,1

"ANGLE"?→A

SketchThick Circle 0,0,1

SketchThick F-Line 0,0,cos A,sin A

Text 5,70,"sin θ:"

Text 12,70,sin A

Text 19,70,"cos θ:"

Text 26,70,cos A

If cos A≠0

Then

Text 33,70,"tan θ:"

Text 40,70,tan A

IfEnd

Text 47,70,"θ:"

Text 54,70,A◢

Menu "AGAIN?","YES",5,"NO",6

Lbl 6

"END - 2023 EWS"



Program Notes:


1.  Adding a display command, ◢, after a draw command like Text freezes the draw screen.  Program execution continues by pressing [ EXE ].


2.  The Text command works with pixels rather than Cartesian points.   Line numbers range from 0 to 63, top to down.  Column numbers range from 0 to 127, right to left.


3.  Syntax of Text:  Text line number, column number, text.   Text may have a string or a variable, but not both.


4.  I have a wrap-around label (Lbl 5) to let the user enter multiple angles.


5.  Due to the linear output of the programming mode, results are shown in floating point decimal approximations.  


6.  tan x = sin x / cos x.  If cos x = 0, then tan x is undefined.   This is why the If condition is present.  



Example Screenshots






I hope you find this useful and educational.  Have an excellent day,


Eddie 



All original content copyright, © 2011-2023.  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: Consolidated Debts

TI 84 Plus CE: Consolidated Debts   Disclaimer: This blog is for informational and academic purposes only. Financial decisions are your ...