Page 1 of 1

Incongruity of the PIXEL function

Posted: Mon Jun 11, 2018 9:33 pm
by PierreMengisen
Incongruité de la fonction PIXEL
J'utilise la fonction PIXEL avec des arguments sous forme COMPLEX. C'est pratique, surtout en mode POLAR.
Mais lorsque j'utilise PIXEL avec des arguments en mode REAL, ces arguments sont inversés.
Exemple: en MODE DEG et POLA, GrMod =3
100.00 ∡30.000
PIXEL
COMPLEX
PIXEL
Les deux PIXEL ne donnent pas le même résultat, Les arguments sont inversés. Pas logique !!!
Je dois remplacer PIXEL par
LBL "PIXON"
REAL?
X<>Y
PIXEL
REAL?
X<>Y
END
A méditer.

D'autre part, ne pourrait-on pas obtenir une fonction PIXOFF pour éteindre 1 PIXEL ? Cela me rendrait bien service.
Mais je pense qu'il s'agit d'un problème de soft interne. Alors ce serait un souhait pour une nouvelle version.


I use the PIXEL function with arguments in COMPLEX form. It's convenient, especially in POLAR mode.
But when I use PIXEL with arguments in REAL mode, these arguments are reversed.
Example: in MODE DEG and POLA, GrMod = 3
100.00 ∡30.000
PIXEL
COMPLEX
PIXEL
The two PIXEL do not give the same result, The arguments are reversed. Illogical !!!
I have to replace PIXEL by
LBL "PIXON"
REAL?
X <> Y
PIXEL
REAL?
X <> Y
END
To meditate.

On the other hand, could not we get a PIXOFF function to turn off 1 PIXEL? It would do me good service.
But I think this is an internal soft problem. So that would be a wish for a new version.

Re: Incongruity of the PIXEL function

Posted: Tue Jun 12, 2018 3:32 pm
by whuyse
Unfortunately, this is exactly how the HP42S behaves as well.
Cheers. Werner

Re: Incongruity of the PIXEL function

Posted: Tue Jun 12, 2018 4:16 pm
by whuyse

Code: Select all

LBL “PIXOFF”
“x”
SF 34
AGRAPH
CF 34
END
The “x” is the multiplication sign.
To be foolproof, the program would have to save the state of flags 34 and 35, then set 34 and clear 35, do AGRAPH and restore flags 34 and 35 to their original settings. But by default they are both clear, so..

Cheers,
Werner

Re: Incongruity of the PIXEL function

Posted: Tue Jun 12, 2018 6:00 pm
by PierreMengisen
Thank you for the PIXOFF. That's exactly what i need. :P :P :P :P :P

Re: Incongruity of the PIXEL function

Posted: Wed Jun 13, 2018 6:14 am
by keithdalby
What do flags 34 and 35 do? I don't understand that PIXOFF program.

Re: Incongruity of the PIXEL function

Posted: Wed Jun 13, 2018 8:59 am
by whuyse
From the manual:
F34 F35 AGRAPH behaviour
C C The image is merged with the existing display (logical OR) -- default state
C S The image overwrites all pixels in that portion of the display
S C Duplicate 'on' pixels are turned 'off'
S S All pixels are reversed (logical XOR)

Cheers, Werner

Re: Incongruity of the PIXEL function

Posted: Fri Jun 29, 2018 7:41 am
by mcc
Hi,

is there a way to have the flags 34/35 settings not only for AGRAPH but also for PIXEL?

Cheers
Meino

Re: Incongruity of the PIXEL function

Posted: Fri Jun 29, 2018 9:01 am
by grsbanks
Not without changing behaviour away from how the HP-42S works. Legacy HP-42S programs might rely on the specific behaviour of PIXEL and would cease to function properly if this were changed. Bad idea.

Re: Incongruity of the PIXEL function

Posted: Fri Jun 29, 2018 9:03 am
by keithdalby
I've not used AGRAPH, but surely it should be possible to AGRAPH a single pixel (what character would that be)? In which case, a simple RPN routine could be written to turn off pixels.

Re: Incongruity of the PIXEL function

Posted: Sat Jun 30, 2018 10:41 am
by whuyse
That is possible indeed.
See the 3rd post in this thread ;-)

Cheers, Werner