Incongruity of the PIXEL function

Post here to share useful tips and tricks, to ask questions about using your DM42 or to report software-related problems
Post Reply
User avatar
PierreMengisen
Posts: 7
Joined: Wed Nov 29, 2017 12:38 pm
Location: Neuchâtel CH

Incongruity of the PIXEL function

Post by PierreMengisen » Mon Jun 11, 2018 7:33 pm

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.
Pierre
[TI59; HP41CV; HP15C; HP28S; DM41; DM41L; DM42]

whuyse
Posts: 26
Joined: Thu Dec 21, 2017 12:23 pm

Re: Incongruity of the PIXEL function

Post by whuyse » Tue Jun 12, 2018 1:32 pm

Unfortunately, this is exactly how the HP42S behaves as well.
Cheers. Werner
42S #3249S01123
DM42 #00345

whuyse
Posts: 26
Joined: Thu Dec 21, 2017 12:23 pm

Re: Incongruity of the PIXEL function

Post by whuyse » Tue Jun 12, 2018 2:16 pm

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
42S #3249S01123
DM42 #00345

User avatar
PierreMengisen
Posts: 7
Joined: Wed Nov 29, 2017 12:38 pm
Location: Neuchâtel CH

Re: Incongruity of the PIXEL function

Post by PierreMengisen » Tue Jun 12, 2018 4:00 pm

Thank you for the PIXOFF. That's exactly what i need. :P :P :P :P :P
Attachments
image.png
image.png (777 Bytes) Viewed 694 times
Pierre
[TI59; HP41CV; HP15C; HP28S; DM41; DM41L; DM42]

keithdalby
Posts: 490
Joined: Mon Apr 24, 2017 6:38 pm

Re: Incongruity of the PIXEL function

Post by keithdalby » Wed Jun 13, 2018 4:14 am

What do flags 34 and 35 do? I don't understand that PIXOFF program.

whuyse
Posts: 26
Joined: Thu Dec 21, 2017 12:23 pm

Re: Incongruity of the PIXEL function

Post by whuyse » Wed Jun 13, 2018 6:59 am

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
42S #3249S01123
DM42 #00345

mcc
Posts: 173
Joined: Fri Jun 23, 2017 3:10 am

Re: Incongruity of the PIXEL function

Post by mcc » Fri Jun 29, 2018 5:41 am

Hi,

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

Cheers
Meino
DM 42 - SN: 00373, Firmware v.:3.11. / 3.11. as compiled by SwissMicros

grsbanks
Posts: 703
Joined: Tue Apr 25, 2017 9:23 am
Location: Preston, Lancs, UK

Re: Incongruity of the PIXEL function

Post by grsbanks » Fri Jun 29, 2018 7:01 am

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.
Not SwissMicros staff, just an enthusiast.

keithdalby
Posts: 490
Joined: Mon Apr 24, 2017 6:38 pm

Re: Incongruity of the PIXEL function

Post by keithdalby » Fri Jun 29, 2018 7:03 am

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.

whuyse
Posts: 26
Joined: Thu Dec 21, 2017 12:23 pm

Re: Incongruity of the PIXEL function

Post by whuyse » Sat Jun 30, 2018 8:41 am

That is possible indeed.
See the 3rd post in this thread ;-)

Cheers, Werner
42S #3249S01123
DM42 #00345

Post Reply