HP Forums
Two Graphics Problems for the Experts - Printable Version

+- HP Forums (https://www.hpmuseum.org/forum)
+-- Forum: HP Calculators (and very old HP Computers) (/forum-3.html)
+--- Forum: HP Prime (/forum-5.html)
+--- Thread: Two Graphics Problems for the Experts (/thread-5714.html)



Two Graphics Problems for the Experts - UncleJohn - 02-19-2016 02:44 AM



The following pseudo code does not work!

Do calculation;

Display Image 1;

FREEZE;

Do more calculations;

Display Image 2;

FREEZE;

etc. etc.

The reason is that the first command in "more calculations" terminates the FREEZE command. This is explained in the calculator HELP.
The question is ,therefore, how may the images be displayed for a completely arbitrary length of time ? Inserting WAIT( n ) ; before FREEZE is not acceptable since the pause is not of arbitrary length ,i.e. it would not change for different executions of the program. Clearly some mechanism to dismiss the image must be found , probably by key press or display touch .
The second question is how is an image displayed using the emulator saved to a file on the host machine in an appropriate format
? Windows 10 solution preferred.
I think that both problems are of general interest and look forward to learning how expert programmers would tackle them.

sincerely

John


RE: Two Graphics Problems for the Experts - Tim Wessman - 02-19-2016 02:50 AM

(02-19-2016 02:44 AM)UncleJohn Wrote:  Inserting WAIT( n ) ; before FREEZE is not acceptable since the pause is not of arbitrary length ,i.e. it would not change for different executions of the program. Clearly some mechanism to dismiss the image must be found , probably by key press or display touch .

Have you tried WAIT(-1)? Check the on-calc help for the wait command.

Quote: The second question is how is an image displayed using the emulator saved to a file on the host machine in an appropriate format

If you mean an automated method, you could do

HFiles("filename.png"):=G0

An you'll end up with a png in your main emulator working directory...

[EDIT]

I meant AFiles not HFiles (there is no such command). Your png will end up in the application directory.