Sunday, April 12, 2026

Numworks: Text Demos with a Poem and Rolling Screen Credits

Numworks: Text Demos with a Poem and Rolling Screen Credits 


The two scripts, which developed in Numworks:



nwtext1.py: Displaying a poem one line at a time.

nwtext2d.py: Presenting the credits in a classic TV show format.



They can be downloaded here:

https://drive.google.com/file/d/1IEDbLV4-mz9kngj0bBOkvBLrgKYg_5ha/view?usp=sharing



Display a Poem: newtext.py



Code:


# nwtext1.py

# Text Animation Demo 1

# Numworks

# Edward Shore, 2/18/2026



# import modules

from math import *

from kandinsky import *

from time import *



# Screen: 320 x 220 pixels



# list of text

t=['Roses are red','violets are blue','Nuwmorks is great','and so are you!']

# list of colors: red, violet, amber, ghost white

c=[(255,0,0),(178,0,237),(255,191,0),(245,245,245)]

# black background

fill_rect(0,0,320,220,(0,0,0))



# list the text

# each line is 20 pixels

for i in range(len(t)):

  # draw the string for each line

  # must include the black background

  # draw_string assumes white background if second color

  # is left off

  draw_string(t[i],60,60+20*i,c[i],(0,0,0))

  # time module's sleep

  sleep(1)



Notes:

1. Modules used: math, kandinsky, time. Math was entered by default every time a new script is started in Numworks. The kandinsky and time modules are specific to Numworks. The kandinsky module includes the drawing commands fill_rec and draw_string while the time module has the command sleep.

2. The line fill_rect(0,0,320,220,(0,0,0)) gives the drawing screen a black background.

3. The syntax for kandinsky’s draw_string is: draw_string(string of text, x y, text color, background color). The colors are optional, with the default set at black text color and white background. Since we have a black background for the entire screen, the background color (0,0,0) must be included.

4. To give readability I estimate that each line has a height of 20 pixels.



TV Screen Credits: nwtext2d.py





Code:

# nwtext2d.py

# Text Animation Demo 2

# Numworks

# Edward Shore, 2/19/2026



# Goal: give a classic TV style flashing of credits



# import modules

from math import *

from kandinsky import *

from time import *



# Screen: 320 x 220 pixels



# lists of text

# I'm not going to worry about center justification on this demo



# unicode for pi is u\03C0



# top line

t0=['CREDITS','Programmer','Supervisor','Directed By','Studio','Written By','A Pisces','']

# bottom line

t1=['','PI MAN','MS. SQUARE ROOT','PYTHAGOREAN THEOREM','SINE STUDIOS','PI MAN','Python Production 2026',':) \u03C0']

# black background in the loop, see comments





# roll credits

# each line is 20 pixels

for i in range(len(t0)):

  # draw a string for each line

  # text is in emerald green

  # background is black, must be included

  # since text is being replaced, we must refresh the      screen every time

  fill_rect(0,0,320,220,(0,0,0))

  draw_string(t0[i],40,60,(80,200,120),(0,0,0))

  draw_string(t1[i],40,100,(80,200,120),(0,0,0))

  # delay by 2 seconds

  sleep(2)



Notes:

1. Modules used: math, kandinsky, time. Math was entered by default every time a new script is started in Numworks. The kandinsky and time modules are specific to Numworks. The kandinsky module includes the drawing commands fill_rec and draw_string while the time module has the command sleep.

2. The line fill_rect(0,0,320,220,(0,0,0)) gives the drawing screen a black background.

3. The syntax for kandinsky’s draw_string is: draw_string(string of text, x y, text color, background color). The colors are optional, with the default set at black text color and white background. Since we have a black background for the entire screen, the background color (0,0,0) must be included.

4. In attempt to vertically center the credits, I put the top line at y = 60 and the bottom line at y = 100. In this demo, I did not worry about center justification, only choosing to left justify all the lines. The strings for the top line are stored in the list t0 while the strings for the bottom line are stored in the list t1.



I hope you enjoy these programs as I did making them,



Eddie

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



Saturday, April 11, 2026

TI-95 PROCALC Programs

TI-95 PROCALC Programs



Here’s to another year with blog! Thank you everyone for your support.








Volume and Surface Area of a Cylinder



volume = π * r^2 * h

surface area = 2 * π * r * (h + r)



Program name: CYL (064 bytes)

‘RADIUS?’ BRK STO R

x^2 * ‘HEIGHT?’ BRK STO H

* PI = STO V ‘VOL=’ COL 16 MRG V BRK

2 * PI * RCL R * (RCL R + RCL H ) = STO A

‘AREA=’ COL 16 MRG A HLT



Example:

Example 1: RADIUS = 18.88, HEIGHT = 19.09

Result: VOL= 21377.64107, AREA= 4504.249671



Example 2: RADIUS = 17, HEIGHT = 9

Result: VOL= 8171.282492, AREA= 2777.167906



Engine Displacement of a Single Cylinder (automobile engine)



displacement = π ÷ 4 * bore^2 * stroke



Program: DSP (32 bytes)

‘BORE?’ BRK x^2 *

‘STROKE?’ BRK * PI / 4 =

‘DISP=’ COL 16 MRG = HLT



Example:

Example 1: BORE = 3.5 in; STROKE = 1.9 in

Result: DISP = 18.28014225 in^3



Example 2: BORE = 3 in; STROKE = 2.4 in

Result: DISP = 16.96460033 in^3



Magnetic Force



F = I * B * L * sin(Θ)



I: current in amps

B: density in Telsa

L: length of the conductor in meters

Θ: angle of the field in degrees

F: magnetic force in Newtons



Program: MGF (32 bytes)

INV DRG ‘ANGLE?’ BRK SIN *

‘L?’ BRK * ‘B?’ BRK * ‘I?’ BRK =

‘F=’ COL 16 MRG = HLT



Examples:

Example 1: Θ: 30°, L: 1.2 m, B: 0.7 T, I: 4 A

Result: F: 1.68 N



Example 2: Θ: 24°, L: 1.8 m, B: 0.7 T, I: 4.4 A

Result: F: 2.254947949 N



Note: INV DRG sets Degree mode



Signal to Noise Ratio



This program calculates signal to noise ratio based on the units used:



Decibels: SNR = S – N

Watts: SNR = 20 * log(S ÷ N)

Voltage: SNR = 10 * log(S ÷ N)



Program: SNR (120 bytes)

‘SIGNAL-NOISE’ PAU CLR

‘S?’ BRK STO S

‘N?’ BRK STO N

‘UNITS?’

DFN F1:DB @ 01

DFN F2: W @ 02

DFN F3: V @ 03

HLT

LBL 01 RCL S – RCL N = GTL 00

LBL 02 ( RCL S / RCL N ) LOG * 20 = GTL 00

LBL 03 ( RCL S / RCL N ) LOG * 10 = GTL 00

LBL 00 ‘SNR=’ COL 16 MRG = DFN CLR HLT



Notes:

Function labels have three characters, add spaces when necessary.

The colon and at sign are added automatically.



Examples:

Example 1: S: -20 db, N: -70 db

Result: SNR = 50



Example 2: S: 128 W, N: 25 W

Result: SNR = 14.18539922



Example 3: S: 76 V, N: 3.5 V

Result: SNR = 13.36745548



Eddie


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


Sunday, April 5, 2026

Spotlight: Sharp EL-520L

 Spotlight: Sharp EL-520L









Quick Facts



Model: EL-520L

Company: Sharp

Type: Solar Scientific Algebraic

Power: Solar with battery backup, 2 x LR 44

Case: Slide case

Memory: 7 memory registers: A, B, C, D, X, Y, M (M has memory addition and subtraction)

Years in Production: 1998

Display: 2 line, with results up to 10 digits



Shout out to Spaceboy Jeffy’s Vintage Emporium from where I purchased the calculator.


Scientific Calculations in Two Lines



The Sharp EL-520L is an early two-line scientific calculator. The top line is where mathematical expressions are entered, where the bottom line is where the results are displayed.






Expressions are entered as written, as noted by Sharp’s ADVANCED D.A.L. (Direct Algebraic Logic.



Example (degrees mode, float mode):

(top | bottom)

0.5; Screen: DEG | 0.5

×; Screen: DEG 0.5*_ |

e^; Screen: DEG 0.5*e^_ |

(sin 10°); Screen: DEG 0.5*e^(sin10) |

=; Screen: DEG 0.5*e^(sin10)= | 0.594818475



Modes



The modes of the EL-520L are controlled by the MODE keys and two toggle keys:



Toggle keys:

[ DRG ]: Change mode through the degrees, radians, and grads cycle. This is how the angle mode is changed on scientific calculators from the 1980s.

[ 2ndF ] [ DRG ] ( DRG> ): A variation of angle change. In this variation, a conversion of angle measurement.

[ 2ndF ] [ . ] (FSE): This the display format toggle: Floating point (no indicator), fixed point (FIX), scientific notation (SCI), engineering notation (ENG). The TAB function, accessed by [ 2ndF ] [ +/- ], set the number of decimal points in the fixed point, scientific notation, and engineering notation format.



There is also a modify (MDF) function that internally rounds the result to the fixed decimal point settings. The modify function does not affect anything stored to variables, however. I wish there was a round function (Round(n, decimal points)) instead, to be honest.



The Mode Key:

The [ MODE ] key offers three modes:

0: Normal. Normal calculator mode.

1: STAT x: Single variable statistics. The [ STO ] key becomes the comma key and memory plus key [ M+ ] becomes the data entry key.

2: STAT xy: Linear regression mode. The data is fit to the equation y = a + bx where a is the y-intercept and b is the slope.



In the statistic modes, the variables (A -D, X, Y, M) are not operable.



Replay and Editing Keys



In Normal mode, there are three editing functions:

[ DEL ]: The standard delete character.

[ 2nd ] [ ← ] (⟲): Takes the cursor to the beginning of the last expression

[ 2nd ] [ → ] ( ? ): Takes the cursor to the next number after the cursor’s position



There is no insert/replace mode. It seems like Sharp was experimenting with editing commands.



Order of Operations (Quirks?)



In a lot of algebraic calculators, the square function has higher priority than negation. Entering -4² returns -16.



Implied multiplication gets a higher priority than division and regular multiplication. Therefore if we enter the infamous expression:



6÷2(1+2) returns 1 instead of 9.



This is known as PEJMDAS where J is juxtaposition, or implied multiplication. For more information, please see The How and Why of Mathematics’ video from 2019:

https://www.youtube.com/watch?v=4x-BcYCiKCk



I’ll leave the debate at this point. Of course, when it doubt, use extra parenthesis or insert an additional multiplication sign ( × ).



One quirk: To insert variables (A, B, C, D, X, Y, M) into expressions, press [ 2ndF ] [ RCL ] (ALPHA).





Final Thoughts



The Sharp EL-520L is nice, basic level calculator with the ability to enter expressions. The EL-520L has a nice amount of the features that will satisfy most needs.




Source


Flow Simulation, Ltd. “Sharp EL-520 (ADVANCED D.A.L.)” calculator.org https://www.calculator.org/calculators/Sharp_EL-520L.html


Eddie


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


Saturday, April 4, 2026

TI-84 Plus CE: Signal to Noise Ratio and Shannon’s Law

TI-84 Plus CE: Signal to Noise Ratio and Shannon’s Law



Signal to Noise Ratio (SNR)


The program SNR calculates the signal to noise ratio for inputs in one of the three units:


Decibels

S – N

Watts

20 * log( S ÷ N )

Voltage

10 * log(S ÷ N )

S: desired signal level

N: noise level


Cadence PCB Solutions (see source) provides a scale of signal to noise ratios and their effectiveness, which is summarized here:


5 dB to 10 dB

No connection is made, the ratio is too low

10 dB to 15 dB

The connection is unreliable

15 dB to 25 dB

Minimum acceptable level

25 dB to 40 dB

Good connection

41 dB and above

Excellent connection


In general, the higher the SNR, the better.


TI-84 TI-Basic Code: Signal to Noise Ratio

Program Title: SNR



Menu(“SIGNAL NOISE RATIO”,”DECIBELS”,1,”WATTS”,2,”VOLTAGE”,3)

Lbl 1

Input “SIGNAL DB? “, S

Input “NOISE DB? “, N

S – N → R

Goto 0

Lbl 2

Input “SIGNAL (W)? “, S

Input “NOISE (W)? “, N

20 * log(S / N) → R

Goto 0

Lbl 3

Input “SIGNAL (V)? “, S

Input “NOISE (W)? “, W

10 * log(S / N) → R

Goto 0

Lbl 0

Disp “SNR (DB): “, R



Examples



Example 1: S: -10 dB, N: -50 dB (from Source)

Results: 40 dB



Example 2: S: 400 W, N: 60 W

Results: 16.47817482 dB



Example 3: S: 300E-3 V (300 millivolts), N: 2E-6 V (2 microvolts)

Result: 51.76091259 dB (*source erroneously had 62 DB)





Shannon’s Law



The program SHANNON makes two calculations: signal to noise ratio in decibels and the capacity of the channel in bits per second. Shannon’s Law was discovered by Claude Shannon during World War II.



C = W * log(1 + S ÷ N) ÷ log(2)



W: bandwidth of the signal in Hertz

S: average signal received in Watts

N: average noise signal in Watts

C: maximum channel capacity in Bits per Second





TI-84 TI-Basic Code: Shannon’s Law

Program Title: SHANNON



Disp “SHANNON’S LAW”

Input “REC’D POWER (W)? “, S

Input “NOISE POWER (W)? “, N

Input “BANDWIDTH (HZ)? “, W

20 * log(S / N) → R

Disp “SIGNAL NOISE RATIO: “, R

W * log(1 + S / N) / log(2) → C

Disp “CHANNEL (BITS/S):”, C



Example



Inputs:

Average Received Signal Power (S): 49.2 W

Average Noise Power (N): 2.2 W

Bandwidth: 200 Hz



Results:

Signal Noise Ratio (SNR): 26.99084844 dB

Channel capacity: 909.2385861 bits/s



Source



Cadence. “What is Signal to Noise Ratio and How to calculate it?” Cadence PCB Solutions. 2020. Accessed November 30, 2025. https://resources.pcb.cadence.com/blog/2020-what-is-signal-to-noise-ratio-and-how-to-calculate-it



Eddie


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

Saturday, March 28, 2026

Casio fx-4000P: Antennas

Casio fx-4000P: Antennas



Vertical and Horizontal Bandwidth


Given the height (h) and length (l) of an antenna plate, along with wavelength (λ) given from the antenna, the vertical and horizontal bandwidth, in degrees is calculated as:


Vertical Bandwidth:

ßv = (k * λ * 180) ÷ (h * π)


Horizontal Bandwidth:

ßh = (k * λ * 180) ÷ (l * π) = h * ßv ÷ l


The constant k is the antenna taper factor, which in the original program assigned the constant as k = 1.4.


Casio fx-4000P Program Code (Prog 0)


“HEIGHT” : ? → H :

“LENGTH” : ? → L :

“WAVE. L.” : ? → W :

“VERT-BAND=” ◢

252 × W ÷ H ÷ π → V ◢

“HOR-BAND=” ◢

H × V ÷ L → Z


Example 1:

Input: H: 2.4 ft (height), W: 12.4 ft (width), λ: 0.18 ft (wavelength)

Results:

Vertical Bandwidth: 6.016056849°

Horizontal Bandwidth: 1.1643981°


Example 2:

Input: H: 3.8 ft (height), W: 3.6 ft (width), λ: 0.05 ft (wavelength)

Results:

Vertical Bandwidth: 1.05544857°

Horizontal Bandwidth: 1.114084602°



Convert from Frequency to Wavelength


This program converts frequency (Hz) to wavelength (ft).


λ = c ÷ f


Using c as the speed of light in a vacuum (299,792,458 m/s), a conversion is required (1 m ≈ 3.28084 ft).


Casio fx-4000P Program Code (Prog 1)


“FREQ” : ? → F :

“WAVE L.=” ◢

299792458 ÷ F × 3.28084



Example 1:

Input: freq = 6200 MHz (6200E6)

Results: 0.158640498 ft



Example 2:

Input: freq = 8500



Equivalent Antenna Area



The equivalent area given the gain of the antenna in decibels (dB):



Ae = (λ² * 10^(G ÷ 10)) ÷ (4 * π)



Casio fx-4000P Program Code (Prog 2)



“GAIN” : ? → G :

“WAVE L.” : ? → W :

“AREA=” ◢ W² × 10^(G ÷ 10) ÷ 4 ÷ π → A



Example 1:

Input: gain = 28 dB, λ = 0.12 ft

Results: 0.7230238578 ft²



Example 2:

Input: gain = 49 dB, λ = 0.19 ft

Results: 228.1903833 ft²



Source


Hewlett Packard. HP-67/HP-97: Users’ Library Solutions: Antennas. Rev. D April 1979. pp. 32 – 26.



Eddie


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

Saturday, March 21, 2026

TI-83 Premium CE Edition Python and Casio fx-92 Collège: Graphing Roses

TI-83 Premium CE Edition Python and Casio fx-92 Collège: Graphing Roses


Introduction


The scripts presented today will draw a rose with the following polar equation:


r = a * cos(n * Θ)


If n is odd, then the rose will have n petals, but if n is even, then the rose will have double the petals (2*n petals).



TI-83 Premium CE Edition Python (and TI-84 Plus CE Python): ROSE84.PY


from math import *

from turtle import *

t=Turtle()

t.clear()

t.hidegrid()

t.hideturtle()

t.pencolor(255,0,0)


# set pedal length

a=100

t.penup()

t.goto(a,0)


# ask for pedals

print(“** rose **”)

print(“odd n: n pedals”)

print(“even n: 2*n pedals”)

n=eval(input(“n? “))

t.clear()


# draw

t.pendown()

for i in range(129):

  # theta

  m=i/128*2*pi

  # r

  r=a*cos(n*m)

  t.goto(r*cos(m),r*sin(m))

t.done()






Casio fx-92 Collège: Graphing a Rose


Note: The instructions are in French.


INSTRUCTION

DETAIL

ENGLISH TRANSLATION

Style Criox


Cross Cursor Style

? → B

Demander valuer B

Input B

20 → A

Metrire var á 20 → A

Set A = 20

Aller á x = A; y = 0


Goto (A, 0)

Stylo écrit


Pen down

Répéter 128


Repeat 128 times (loop):

C ÷ 128 × 2 × π → D

Metrire var á C ÷ 128 × 2 × π → D

Set D = C/128*2*π

A × cos((B × D)^r) → E

Metrire var á A × cos((B × D)^r) → E

Set E = A*(cos(B*D)), B*D is in radians.

Aller à x=E×cos(D^r); y=E×sin(D^r)


Goto (E * cos D, E * sin D). D is in radians.

C + 1 → C

Metrire var á C + 1 → C

Set C = C + 1


End of loop


Note: To designate a measure of an angle to be radians regardless of calculator setting, press [ CATALOG ] >> Angl/Coord/Sexag >> Radians.






Drawing roses on the first day of spring,



Eddie


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

Numworks: Text Demos with a Poem and Rolling Screen Credits

Numworks: Text Demos with a Poem and Rolling Screen Credits  The two scripts, which developed in Numworks: nwtext1.py: Displayin...