Post Reply 
Casio Python updates
01-24-2021, 12:51 PM
Post: #17
RE: Casio Python updates
(01-23-2021 06:17 PM)Benoit Morissette Wrote:  January 23, 2021.

Upgraded my Casio fx-9760GIII to 3.40.3200 using the “fx-9860GIII Series OS Ver.3.40 Update.exe” file (dated: 2020-09-30). Works very well. Python is 3 times faster than Basic and includes casioplot module. I have adapted the “hat.py” for the lower screen resolution by tweaking some constants. Here it is:

Code:

from math import *
from casioplot import *
blk=(0,0,0)
wht=(255,255,255)
p=64; q=32
xp=55; xr=1.8*3.14159265358
yp=20; yr=3; zp=20
xf=xr/xp; yf=yp/yr; zf=xr/zp
for zi in range(-q,q):
  if zi>=-zp and zi<=zp:
    zt=zi*xp/zp; zz=zi
    xl=int(.5+sqrt(xp*xp-zt*zt))
    for xi in range(-xl,xl+1):
      xt=sqrt(xi*xi+zt*zt)*xf; xx=xi
      yy=(sin(xt)+.4*sin(3*xt))*yf
      x1=int(xx+zz+p)
      y1=192-int(yy-zz+q)
      set_pixel(x1,y1,(0,255,0))
      for m in range(y1+1,y1+10):
        set_pixel(x1,m)
    show_screen()
The results are beautiful and fast!

What are the variables blk and wht for? I don't see them used anywhere after being initialized.

Tom L
Cui bono?
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
Casio Python updates - ijabbott - 04-07-2020, 08:19 PM
RE: Casio Python updates - toml_12953 - 04-08-2020, 02:53 AM
RE: Casio Python updates - ijabbott - 04-08-2020, 08:44 PM
RE: Casio Python updates - toml_12953 - 04-08-2020, 09:37 PM
RE: Casio Python updates - ijabbott - 04-09-2020, 12:03 AM
RE: Casio Python updates - toml_12953 - 04-11-2020, 04:09 PM
RE: Casio Python updates - Helix - 04-08-2020, 10:40 PM
RE: Casio Python updates - toml_12953 - 04-09-2020, 12:15 AM
RE: Casio Python updates - ijabbott - 04-09-2020, 12:35 AM
RE: Casio Python updates - toml_12953 - 04-09-2020, 12:54 AM
RE: Casio Python updates - StephenG1CMZ - 04-11-2020, 03:40 PM
RE: Casio Python updates - toml_12953 - 04-11-2020, 04:31 PM
RE: Casio Python updates - StephenG1CMZ - 04-11-2020, 07:31 PM
RE: Casio Python updates - toml_12953 - 04-11-2020, 08:38 PM
RE: Casio Python updates - toml_12953 - 04-12-2020, 03:53 PM
RE: Casio Python updates - toml_12953 - 01-24-2021 12:51 PM
RE: Casio Python updates - StephenG1CMZ - 01-24-2021, 03:22 PM
RE: Casio Python updates - critor - 01-26-2021, 07:20 PM
RE: Casio Python updates - robve - 02-13-2021, 06:27 PM
RE: Casio Python updates - robve - 02-14-2021, 03:00 AM



User(s) browsing this thread: 1 Guest(s)