Post Reply 
Surprise graphic program (HP-48G, GX)
10-28-2014, 05:16 PM
Post: #5
RE: Surprise graphic program (HP-48G, GX)
(10-28-2014 08:45 AM)Gilles Wrote:  Cool !

It works fine on 50G

This looks better on the hp 50g:

Code:

%%HP: T(3)A(D)F(.);
\<< # 131d # 80d BLANK PICT STO 66. 125.
  FOR c c 66. - \v/ NEG 10. + 4. * R\->B c R\->B SWAP OVER NEG 131. + OVER NEG 79. + 4. PICK OVER 4. PICK 6. PICK 2. \->LIST PIXON 2. \->LIST PIXON 2. \->LIST PIXON 2. \->LIST PIXON
  NEXT { # 0d # 8d } { # 130d # 71d } BOX { # 125d # 8d } { # 125d # 71d } LINE { # 6d # 8d } { # 6d # 71d } LINE 7. 65.
  FOR c c NEG 65. + \v/ NEG 10. + 4. * R\->B c R\->B SWAP DUP2 NEG 79. + 2. \->LIST UNROT 2. \->LIST LINE
  NEXT { # 0d # 0d } PVIEW 2. WAIT 7. 64.
  FOR c c NEG 65. + \v/ NEG 10. + 4. * 1. + R\->B c R\->B SWAP DUP2 NEG 79. + OVER NEG 131. + DUP2 6. PICK 2. \->LIST UNROT 2. \->LIST LINE 2. \->LIST UNROT 2. \->LIST TLINE { # 0d # 0d } PVIEW .5 WAIT
  NEXT { # 0d # 0d } PVIEW
  DO
  UNTIL KEY
  END DROP
\>>

Almost three times faster on the HP 50g, but the initialization is still somewhat slow. The first two loops might be combined into one, but I haven't tried it yet. I picture hasn't been expanded to occupy the whole screen because I don't want to distort its shape ( y = x^4 ). In a physical object with that format the height of water would increase linearly with time.

Gerson.
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Surprise graphic program (HP-48G, GX) - Gerson W. Barbosa - 10-28-2014 05:16 PM



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