Post Reply 
New Casio fx-9860 GIII model
01-16-2022, 03:30 PM
Post: #63
RE: New Casio fx-9860 GIII model
(10-21-2020 12:47 AM)Druzyek Wrote:  My fx-9750GIII came in the mail today, and it's really impressive! The Python implementation seems to work really well. The manual says the editor can only handle files with up to 150 lines, though it can execute files larger than that. This is kind of annoying but not a dealbreaker. The latest OS update adds the casioplot module so you can use graphics from Python.

I've tried casioplot to create some graphics, but cannot figure out how to wait for a keypress. The problem is that the input() function switches back to the text screen. For example:

Code:
from casioplot import *
def example():
  clear_screen()
  for i in range(1,379)
    set_pixel(i,100)
  show_screen()
  x=input()

On my fx-CG50 this very briefly displays the line drawn, but immediately switches to the text screen to wait for input().

- how to read a keypress without losing the casioplot screen?
- how to check for a keypress without waiting?
- are the any other graphics drawing commands, other than just set_pixel()? There is no line() no circle() no fill() no paint()?
- how to specify colors (fx-CG50)?

My other issue with the fx-CG50 is that it has no built-in help for the calculator's features or for Python. Sure, the CATALOG has a QR feature to pull up the calculator instructions online, but not for Python as far as I can tell. BTW does anyone know anyone else who thinks that help via a QR code was a good idea? By comparison, my Casio FX-9860G Slim has a help button and shows a dialogue box with a short help message. I don't use it as often as when I got the Slim, but it is still a nice reminder how to use not-so-often used functions. Something like that is really a must-have to be able to use Casio-specific Python imports such as casioplot.

Python graphics is nice to have on the fx-CG50. The Casio plot and line commands are slow as molasses. Whereas the HP Prime instantly displays lines in PPL, the Casio takes forever to draw graphics. To demonstrate what I mean:

Casio Basic program:

Code:
' Hitomezashi patterns
384-4→H↵
216-28→V↵
ViewWindow 1,H-1,H,1,V,V-1↵
8→S↵
For 1→Y To V-1 Step S↵
SInt 2Rnd# →I↵
For I+1→X To H-1 Step S↵
Blue Plot X,Y↵
Blue Plot X+S,Y↵
Blue Line↵
Next↵
Next↵
For 1→X To H-1 Step S↵
SInt 2Rnd# →I↵
For I+1→Y To V-1 Step S↵
Blue Plot X,Y↵
Blue Plot X,Y+S↵
Blue Line↵
Next↵
Next↵

This takes minutes to complete.

By contrast, the HP Prime PPL program draws the same pattern instantly with Hitomezashi(8):

Code:
EXPORT Hitomezashi(S)
BEGIN
LOCAL X,Y,I,C;
C:=RGB(0,0,255);
RECT_P():
FOR Y FROM 0 TO 239 STEP S DO
 X:=S*RANDINT();
 FOR I FROM X TO 319 STEP 2*S DO
  LINE_P(I,Y,I+S,Y,C)
 END;
END;
FOR X FROM 0 TO 319 STEP S DO
 Y:=S*RANDINT();
 FOR I FROM Y TO 239 STEP 2*S DO
  LINE_P(X,I,X,I+S,C)
 END;
END;
WAIT();
END;

I haven't yet tried a HP Prime Python program for this, but I bet it is at least as fast.

About Hitomezashi patterns: https://www.youtube.com/watch?v=JbfhzlMk2eY

- Rob

"I count on old friends" -- HP 71B,Prime|Ti VOY200,Nspire CXII CAS|Casio fx-CG50...|Sharp PC-G850,E500,2500,1500,14xx,13xx,12xx...
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
New Casio fx-9860 GIII model - Coco - 01-09-2020, 04:34 PM
RE: New Casio fx-9860 GIII model - Hlib - 01-09-2020, 08:02 PM
RE: New Casio fx-9860 GIII model - Coco - 02-02-2020, 04:15 PM
RE: New Casio fx-9860 GIII model - lrdheat - 03-06-2020, 03:22 PM
RE: New Casio fx-9860 GIII model - Dands - 03-08-2020, 04:07 AM
RE: New Casio fx-9860 GIII model - klesl - 03-08-2020, 12:25 PM
RE: New Casio fx-9860 GIII model - lrdheat - 03-10-2020, 05:51 PM
RE: New Casio fx-9860 GIII model - klesl - 05-14-2020, 04:30 PM
RE: New Casio fx-9860 GIII model - lrdheat - 10-04-2020, 11:34 PM
RE: New Casio fx-9860 GIII model - pier4r - 10-06-2020, 08:26 PM
RE: New Casio fx-9860 GIII model - vaklaff - 10-11-2020, 06:29 PM
RE: New Casio fx-9860 GIII model - lrdheat - 10-15-2020, 03:43 PM
RE: New Casio fx-9860 GIII model - lrdheat - 10-18-2020, 11:26 PM
RE: New Casio fx-9860 GIII model - Druzyek - 10-21-2020, 12:47 AM
RE: New Casio fx-9860 GIII model - DiTBho - 01-01-2021, 01:25 PM
RE: New Casio fx-9860 GIII model - critor - 01-01-2021, 08:37 PM
RE: New Casio fx-9860 GIII model - robve - 01-16-2022 03:30 PM
RE: New Casio fx-9860 GIII model - critor - 01-19-2022, 08:36 PM
RE: New Casio fx-9860 GIII model - robve - 01-21-2022, 03:28 PM



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