Sunday, February 28, 2021

TI-84 Plus CE and TI-73 Explorer: Analog Clock

 TI-84 Plus CE and TI-73 Explorer:  Analog Clock


Introduction


The program ANALOG draws a 12-hour analog clock for any given time, given the hour and minute.  The TI-73 program covers the TI-73 Explorer and should be ported to any of the Texas Instruments calculators with monochrome screens with no or little adjustment.


The TI-84 Plus CE adds colors:  hour hand is black, minute hand is brown, the markers are orange.  Adjust colors to your liking.


Notes:


*  The program pauses when the clock is drawn.  Pressing [ENTER] restores turns the Axes back on.


*  The Pt-On command has the syntax Pt-On(x, y, mark, color*).   Mark:  Dot (1 or default), Open Square (2), Plus (3).   Color applies only to the TI-84 Plus CE or TI-84 Plus C Silver Edition.


*  The program sets the calculator to degrees mode.


Math:


Let H be the hour and M be the minute.


Set S = H + M/60,  where S is the decimal hour of the time given.


For a circle of 360°, each hour occupies 30° of the clock (360/12).  Like wise, each minute occupies 6° of the clock  (360/60).


A = 30*S,  B= 6*M


Lines are drawn from the origin (0,0) to a point (x,y).  If we set x and y to an angle θ, then:


x = r * cos θ,  y = r * sin θ, where r is the length of the line.


Angels on a cartesian plane start from the positive x-axis and measured going counter-clockwise.  However, on the analog clock requires angels to measured from the top (due north) and rotate clockwise.  This will require a vertical flip and adjusting the angle by 90°.  The adjusted coordinates are:

 

x = r * cos (θ-90°),  y = -r * sin (θ- 90°), where r is the length of the line.



TI-73 Program: ANALOG

(this includes TI-73 Explorer)


"EWS 2021"

FnOff

PlotsOff

ClrDraw

Degree

Disp "12 HR ANALOG"

Input "HOUR? ",H

Input "MINUTE? ",M

ZStandard

ZSquare

AxesOff

Circle(0,0,8)

For(X,30,360,30)

Pt-On(7*cos(X-90),-7*sin(X-90),2)

End

Line(0,0,5*cos(30H+M-90),-5*sin(30H+M-90))

Line(0,0,7*cos(6M-90),-7*sin(6M-90))

Pause

AxesOn


TI-84 Plus CE Program:  ANALOG


"EWS 2021-01-18"

FnOff 

PlotsOff 

ClrDraw

Degree

Disp "12 HOUR ANALOG CLOCK"

Input "HOUR? ",H

Input "MINUTE? ",M

ZStandard

ZSquare

AxesOff

GridOff

"FACE"

Circle(0,0,8,MEDGRAY)

For(I,30,360,30)

Pt-On(7*cos(I-90),­7*sin(I-90),2,ORANGE)

End

"HOUR"

Line(0,0,5*cos(30H+M/2-90),­5*sin(30H+M/2-90),1,BLACK)

"MINUTE"

Line(0,0,7*cos(6*M-90),­7*sin(6*M-90),1,BROWN)

Pause 

AxesOn 



Next week, more fun with the TI-73 Explorer.  


Eddie


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


Casio fx-CG50 and Swiss Micros DM32: HP 16C’s Bit Summation

  Casio fx-CG50 and Swiss Micros DM32: HP 16C’s Bit Summation The HP 16C’s #B Function The #B function is the HP 16C’s number of...