Post Reply 
fx-CG500 Hat Program
05-04-2021, 10:14 AM (This post was last modified: 05-04-2021 10:17 AM by toml_12953.)
Post: #1
fx-CG500 Hat Program
I got a new Casio fx-CG500 ClassPad recently and, of course, had to create a version of my green hat program for it so I could benchmark it. The G2 Prime with the April 28 Beta ran this in Python in about 0.9 seconds. The ClassPad takes about 7 HOURS! Of course, I'm not familiar with it yet. Maybe there's a way to optimize it that I haven't found yet. At any rate (pun intended!) here's the program for the ClassPad:

Code:
SetRadian: SetDecimal: SetCoord Off
ViewWindow 1,320,0,1,528,0
Cls
Message "Tap OK, then Resize and resume"
Pause
DrawShade -350,900,1,320,ColorBlack 
264⇒p: 160⇒q
144⇒xp: 1.5×3.1415927⇒xr
56⇒yp: 1⇒yr: 64⇒zp
xr/xp⇒xf: yp/yr⇒yf: xr/zp⇒zf
For -q⇒zi To q-1
  If zi≥-zp and zi≤zp: Then 
    zi×xp/zp⇒zt: zi⇒zz
    int(.5+√(xp×xp-zt×zt))⇒xl
    For -xl⇒xi To xl
      √(xi×xi+zt×zt)×xf⇒xt: xi⇒xx
      (sin(xt)+.4×sin(3×xt))×yf⇒yy
      Int(xx+zz+p)⇒ya
      Int(yy-zz+q)⇒xa
      PxlOn xa,ya,ColorGreen 
      If xa≠0: Then 
        For xa-1⇒m To xa-10 Step -1
          PxlOn m,ya,ColorBlack
        Next 
      IfEnd
    Next
  IfEnd
Next

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




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